:root {
  --bg: #121317;
  --bg-2: #16181c;
  --surface: #1d1f24;
  --card: #23252a;
  --card-2: #2a2d33;
  --line: #33373f;
  --line-soft: rgba(255, 255, 255, 0.06);
  --red: #b4232f;
  --red-hover: #c92d3a;
  --red-soft: rgba(180, 35, 47, 0.16);
  --ok: #198754;
  --ok-text: #6fd59e;
  --danger-text: #ff8f99;
  --warn: #c9932b;
  --warn-text: #f0c46a;
  --neutral: #59616d;
  --blue: #4057b8;
  --silver: #c4c8cf;
  --text: #f4f5f7;
  --muted: #a7adb7;
  --faint: #6f7682;
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --radius: 8px;
  --radius-sm: 6px;
  --sidebar-w: 264px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

code,
.mono {
  font-family: var(--mono);
  font-size: 0.86em;
}

.icon {
  flex-shrink: 0;
}

::selection {
  background: var(--red);
  color: #fff;
}

html {
  color-scheme: dark;
  scrollbar-color: #3a3e47 transparent;
  scroll-padding-top: 76px;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid rgba(201, 45, 58, 0.85);
  outline-offset: 2px;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.18s;
}

.nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--red), #ff6b75);
  box-shadow: 0 0 10px rgba(201, 45, 58, 0.7);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  pointer-events: none;
}

body.is-navigating .nav-progress {
  opacity: 1;
  animation: navProgress 6s cubic-bezier(0.1, 0.7, 0.2, 1) forwards;
}

@keyframes navProgress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(0.92);
  }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

/* ——— Animációs alapok ——— */

@keyframes fadeUp {
  from {
    opacity: 0;
    translate: 0 14px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    translate: 0 18px;
    scale: 0.98;
  }
  to {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
}

@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;
  }
}

@keyframes drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(4%, -3%) scale(1.08);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

@keyframes kenburns {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1.14) translate(-1.5%, -1%);
  }
}

@keyframes shimmer {
  from {
    transform: translateX(-120%) skewX(-18deg);
  }
  to {
    transform: translateX(220%) skewX(-18deg);
  }
}

@keyframes growBar {
  from {
    width: 0;
  }
  to {
    width: var(--w);
  }
}

@keyframes tick {
  0% {
    transform: translateY(-30%);
    opacity: 0.2;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

.js .reveal-again {
  opacity: 0;
  animation: fadeUp 0.35s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 30ms);
}

/* ——— Gombok, chipek ——— */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.83rem;
  cursor: pointer;
  overflow: hidden;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s var(--ease),
    box-shadow 0.2s ease;
}

.btn-sm {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--red-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--card-2);
  color: var(--text);
}

.btn-discord {
  background: var(--discord);
  color: #fff;
}

.btn-discord:hover {
  background: var(--discord-hover);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: background 0.2s ease;
}

.icon-btn:hover {
  background: var(--card-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}

.chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.chip--ok {
  color: var(--ok-text);
  background: rgba(25, 135, 84, 0.14);
  border-color: rgba(25, 135, 84, 0.35);
}

.chip--danger {
  color: var(--danger-text);
  background: var(--red-soft);
  border-color: rgba(180, 35, 47, 0.4);
}

.chip--warn {
  color: var(--warn-text);
  background: rgba(201, 147, 43, 0.14);
  border-color: rgba(201, 147, 43, 0.35);
}

.chip--neutral {
  color: var(--silver);
  background: rgba(89, 97, 109, 0.22);
  border-color: rgba(89, 97, 109, 0.5);
}

.chip--muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.chip--pulse i {
  animation: pulse 2s infinite;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--surface);
}

.pill--live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2fbf71;
  color: #2fbf71;
  animation: pulse 2s infinite;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  padding: 11px 13px;
  border-radius: var(--radius);
  background: rgba(143, 30, 40, 0.28);
  border: 1px solid rgba(180, 35, 47, 0.5);
  color: #ffd2d7;
  font-size: 0.86rem;
  text-align: left;
}

.alert::before {
  content: "!";
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  background: var(--red);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
}

.muted {
  color: var(--muted);
}

/* ——— Belépés ——— */

body.is-login {
  background: var(--bg);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.login-shell {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(940px, 100%);
  min-height: 460px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  background: rgba(35, 37, 42, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 40px 120px -30px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  animation: scaleIn 0.7s var(--ease) both;
}

.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 56px 48px;
  text-align: center;
}

.login-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 6px;
}

.login-logo--fallback,
.brand-mark--fallback,
.side-logo--fallback {
  display: grid;
  place-items: center;
  background: var(--red);
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.login-panel h1 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.login-panel p {
  margin: 0 0 6px;
  max-width: 270px;
  color: var(--muted);
  font-size: 0.88rem;
}

.login-accept {
  margin: 14px 0 0;
  max-width: 280px;
  color: var(--faint);
  font-size: 0.75rem;
  line-height: 1.45;
  text-align: center;
}

.login-accept a {
  color: var(--muted);
}

.legal {
  width: min(720px, 100%);
  padding: 28px 30px;
}

.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
}

.legal__back:hover {
  color: var(--text);
}

.legal h1 {
  margin: 0 0 8px;
  font-size: 1.45rem;
}

.legal__meta {
  margin: 0 0 22px;
  font-size: 0.82rem;
}

.legal__section {
  margin: 0 0 18px;
}

.legal__section h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1rem;
}

.legal__section p,
.legal__section li {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.legal__section p {
  margin: 0 0 8px;
}

.legal__section ul {
  margin: 0 0 8px;
  padding-left: 1.2rem;
}

.legal__section li {
  margin-bottom: 4px;
}

.legal__section a {
  color: var(--danger-text);
}

.legal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.legal__foot a {
  color: var(--muted);
  font-size: 0.82rem;
}

.login-panel .btn-discord {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.84rem;
  margin-top: 6px;
}

.login-visual {
  position: relative;
  overflow: hidden;
  background: #2b2f36;
}

.login-visual__img {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(160deg, rgba(180, 35, 47, 0.35), rgba(18, 19, 23, 0.1) 55%),
    var(--login-image, linear-gradient(135deg, #2b2f36, #1a1c20));
  background-size: cover;
  background-position: center;
  animation: kenburns 22s ease-in-out infinite alternate;
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.7));
}

.login-visual__brand {
  position: absolute;
  left: 24px;
  bottom: 22px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeUp 0.8s var(--ease) 0.35s both;
}

.brand-mark {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.login-visual__brand strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
}

.login-visual__brand span {
  color: var(--silver);
  font-size: 0.82rem;
}

/* ——— App váz ——— */

body.is-app {
  background: var(--bg);
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 14px;
  background: linear-gradient(180deg, #1a1c21, #16181c);
  border-right: 1px solid var(--line-soft);
  z-index: 30;
}

.sidebar__top {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 8px 20px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.side-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  transition: transform 0.4s var(--ease);
}

.side-brand:hover .side-logo {
  transform: rotate(-8deg) scale(1.06);
}

.side-brand strong {
  display: block;
  font-size: 0.98rem;
  letter-spacing: 0.1em;
}

.side-brand span {
  display: block;
  color: var(--faint);
  font-size: 0.75rem;
}

.side-label {
  padding: 0 10px 8px;
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    padding 0.25s var(--ease);
}

.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--red);
  border-radius: 0 2px 2px 0;
  transform: translateY(-50%);
  transition: height 0.25s var(--ease);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding-left: 15px;
}

.nav-link.is-active {
  background: linear-gradient(90deg, var(--red-soft), rgba(180, 35, 47, 0.04));
  color: var(--text);
}

.nav-link.is-active::before {
  height: 60%;
}

.nav-link.is-active .icon {
  color: #ff6b76;
}

.sidebar__bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.side-profile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.side-profile:hover {
  background: var(--surface);
  border-color: var(--line);
}

.side-profile__text {
  min-width: 0;
}

.side-profile__text strong,
.side-profile__text span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.side-profile__text strong {
  font-size: 0.88rem;
}

.side-profile__text span {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.76rem;
}

.avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.status-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid #16181c;
}

.avatar-wrap--lg {
  width: 96px;
  height: 96px;
}

.avatar-wrap--lg img {
  border: 3px solid var(--card);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
}

.avatar-wrap--lg .status-dot {
  width: 18px;
  height: 18px;
  right: 4px;
  bottom: 4px;
  border-width: 3px;
  border-color: var(--card);
}

.side-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.8rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.side-logout:hover {
  color: var(--danger-text);
  border-color: rgba(180, 35, 47, 0.5);
  background: var(--red-soft);
}

.sidebar-backdrop {
  display: none;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 60px;
  padding: 0 32px;
  background: rgba(18, 19, 23, 0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.menu-toggle {
  display: none;
}

.topbar__title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}

.topbar__title > .crumb:last-of-type,
.topbar__current {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 600px) {
  .topbar__title .crumb,
  .topbar__title .crumb-sep {
    display: none;
  }

  .topbar__current {
    display: inline;
  }
}

.crumb,
.crumb-sep {
  color: var(--faint);
}

.topbar__meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.clock {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--silver);
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  min-width: 82px;
  text-align: center;
}

.content {
  width: 100%;
  padding: 30px 32px 56px;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page > * {
  margin-top: 0;
}

.page-head {
  margin-bottom: 0;
}

.page-head h1 {
  margin: 0 0 4px;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

/* ——— Kártyák, közös felületek ——— */

.panel,
.stat,
.event-card,
.hero,
.profile-hero {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    border-color 0.25s ease,
    transform 0.3s var(--ease),
    box-shadow 0.3s ease;
}

.stat:hover,
.event-card:hover {
  transform: translateY(-2px);
  border-color: #40454f;
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
}

.panel {
  padding: 18px 20px;
}

.panel--narrow {
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel__head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  transition: color 0.2s ease, gap 0.2s var(--ease);
}

.link:hover {
  color: var(--text);
  gap: 8px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.split > * {
  min-width: 0;
}

.split--aside {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  align-items: start;
}

@media (max-width: 1280px) {
  .split--aside {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ——— Hero ——— */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 26px 28px;
  overflow: hidden;
  border-left: 3px solid var(--red);
}

.hero__content {
  position: relative;
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ff7b85;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h2 {
  margin: 8px 0 10px;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hero__countdown {
  position: relative;
  display: grid;
  justify-items: end;
  gap: 10px;
}

.hero__countdown > label {
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.big-countdown {
  display: flex;
  gap: 8px;
}

.big-countdown > div {
  display: grid;
  justify-items: center;
  min-width: 62px;
  padding: 10px 8px 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.big-countdown strong {
  display: block;
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.big-countdown strong.tick {
  animation: tick 0.35s var(--ease);
}

.big-countdown span {
  color: var(--faint);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--muted);
  font-size: 0.86rem;
}

.meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-row .icon {
  color: var(--faint);
}

/* ——— Statisztikák ——— */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  overflow: hidden;
}

.stat__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--card-2);
  border: 1px solid var(--line);
  color: var(--silver);
  transition: transform 0.35s var(--ease), color 0.2s ease;
}

.stat:hover .stat__icon {
  transform: scale(1.08) rotate(-4deg);
}

.stat--ok .stat__icon {
  color: var(--ok-text);
  background: rgba(25, 135, 84, 0.12);
  border-color: rgba(25, 135, 84, 0.3);
}

.stat--danger .stat__icon {
  color: var(--danger-text);
  background: var(--red-soft);
  border-color: rgba(180, 35, 47, 0.35);
}

.stat--warn .stat__icon {
  color: var(--warn-text);
  background: rgba(201, 147, 43, 0.16);
  border-color: rgba(201, 147, 43, 0.35);
}

.stat__body {
  min-width: 0;
}

.stat label {
  display: block;
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 2px;
  font-size: 1.25rem;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stat__hint {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.stat__icon {
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stats > .stat:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .stat {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
  }

  .stat__icon {
    width: 34px;
    height: 34px;
  }

  .stat label {
    letter-spacing: 0.06em;
  }

  .stat strong {
    font-size: 1.1rem;
  }
}

/* ——— Listák ——— */

.list {
  display: grid;
  gap: 6px;
}

.list-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.25s var(--ease);
}

.list-row:hover {
  background: var(--card-2);
  border-color: var(--line);
  transform: translateX(3px);
}

.list-row__date {
  display: grid;
  justify-items: center;
  width: 46px;
  padding: 5px 0;
  border-radius: var(--radius);
  background: var(--red-soft);
  border: 1px solid rgba(180, 35, 47, 0.3);
  color: #ff8f99;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
}

.list-row__date b {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.1;
}

.list-row__main {
  min-width: 0;
}

.list-row__main strong,
.list-row__main span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.list-row__main strong {
  font-size: 0.9rem;
}

.list-row__main span {
  color: var(--muted);
  font-size: 0.8rem;
}

.kv {
  display: grid;
  gap: 0;
  margin: 0;
}

.kv > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}

.kv > div:last-child {
  border-bottom: 0;
}

.kv dt {
  color: var(--muted);
  font-size: 0.84rem;
}

.kv dd {
  margin: 0;
  font-weight: 600;
  font-size: 0.88rem;
  text-align: right;
}

/* ——— Események ——— */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.audit-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px)) minmax(180px, 1fr);
  gap: 12px 14px;
  align-items: end;
}

.audit-filters .search {
  width: 100%;
}

@media (max-width: 860px) {
  .audit-filters {
    grid-template-columns: 1fr 1fr;
  }

  .audit-filters .search {
    grid-column: 1 / -1;
  }
}

.stats + .toolbar,
.stats + .roster,
.stats + .notice {
  margin-top: 20px;
}

.tabs {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  white-space: nowrap;
  gap: 8px;
  padding: 7px 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.tab b {
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.72rem;
}

.tab.is-active {
  color: var(--text);
}

.tab.is-active b {
  background: rgba(180, 35, 47, 0.35);
}

.tabs__ink {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: var(--radius-sm);
  background: var(--card-2);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), width 0.35s var(--ease);
}

.event-list {
  display: grid;
  gap: 14px;
}

.event-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  overflow: hidden;
}

.event-card[hidden] {
  display: none;
}

.event-card__date {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  padding: 16px 8px;
  background: linear-gradient(180deg, rgba(180, 35, 47, 0.22), rgba(180, 35, 47, 0.06));
  border-right: 1px solid var(--line);
}

.event-card__month {
  color: #ff8f99;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.event-card__day {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.event-card__time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.event-card[data-filter-item="past"] {
  opacity: 0.78;
}

.event-card[data-filter-item="past"] .event-card__date {
  background: rgba(255, 255, 255, 0.025);
}

.event-card__body {
  display: grid;
  gap: 10px;
  padding: 16px 20px;
  min-width: 0;
}

.event-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.code {
  font-family: var(--mono);
  color: var(--faint);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.event-card h3 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
}

.event-card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rsvp-bar {
  display: flex;
  height: 6px;
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.rsvp-bar__seg {
  height: 100%;
  width: var(--w);
  animation: growBar 1s var(--ease) 0.4s both;
}

.rsvp-bar__seg--ok {
  background: var(--ok);
}

.rsvp-bar__seg--danger {
  background: var(--red);
}

.rsvp-bar__seg--neutral {
  background: var(--neutral);
}

.rsvp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.78rem;
}

.rsvp-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.dot--ok {
  background: var(--ok);
}

.dot--danger {
  background: var(--red);
}

.dot--neutral {
  background: var(--neutral);
}

.event-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.event-card__mine {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.event-card__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.countdown {
  font-family: var(--mono);
  color: var(--silver);
  font-size: 0.78rem;
}

.countdown.is-live {
  color: var(--ok-text);
}

.empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 48px 20px;
  text-align: center;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.empty[hidden] {
  display: none;
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 6px;
  border-radius: var(--radius);
  background: var(--card-2);
  color: var(--muted);
}

.empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.hero--empty {
  grid-template-columns: minmax(0, 1fr);
  border-left-color: var(--line);
}

.hero--empty .empty,
td > .empty {
  background: transparent;
  border: none;
}

.hero--empty .empty {
  padding: 8px 4px;
}

td > .empty {
  padding: 18px 12px;
}

td > .empty .empty__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 2px;
}

/* ——— Képzés ——— */

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.table th {
  position: static;
  padding: 10px 12px;
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
  line-height: 1.4;
}

.table th.table__end,
.table td.table__end {
  text-align: right;
  white-space: nowrap;
}

.table tbody tr {
  transition: background 0.2s ease;
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table .nowrap {
  white-space: nowrap;
}

.cell-stack {
  display: grid;
  gap: 2px;
  line-height: 1.3;
}

.cell-stack > span {
  color: var(--faint);
  font-size: 0.76rem;
}

.steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.steps b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  background: var(--red-soft);
  border: 1px solid rgba(180, 35, 47, 0.35);
  color: #ff8f99;
  font-size: 0.85rem;
}

.steps em {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
}

/* ——— Profil ——— */

.profile-hero {
  overflow: hidden;
}

.profile-hero__banner {
  height: 120px;
  background:
    linear-gradient(120deg, rgba(180, 35, 47, 0.75), rgba(180, 35, 47, 0.15) 60%, transparent),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 12px, transparent 12px 24px),
    #1d1f24;
  background-size: 200% 100%, auto, auto;
  animation: bannerShift 12s ease-in-out infinite alternate;
}

@keyframes bannerShift {
  from {
    background-position: 0% 0, 0 0, 0 0;
  }
  to {
    background-position: 100% 0, 0 0, 0 0;
  }
}

.profile-hero__body {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding: 0 24px 20px;
  margin-top: -44px;
}

.profile-hero h2 {
  margin: 0 0 2px;
  font-size: 1.45rem;
  font-weight: 800;
}

.profile-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role {
  --role: var(--silver);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card-2);
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 0.2s ease, transform 0.25s var(--ease);
}

.role:hover {
  border-color: var(--role);
  transform: translateY(-1px);
}

.role i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--role);
}

/* ——— Reszponzív ——— */

@media (max-width: 1080px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero__countdown {
    justify-items: start;
  }
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    transform: translateX(-100%);
    transition: transform 0.35s var(--ease);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
  }

  body.menu-open .sidebar {
    transform: none;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  body.menu-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .topbar {
    padding: 0 16px;
  }

  .pill--live {
    display: none;
  }

  .content {
    padding: 22px 16px 48px;
  }
}

@media (max-width: 780px) {
  .login-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-visual {
    min-height: 190px;
    order: -1;
  }

  .login-panel {
    padding: 36px 24px;
  }

  .event-card {
    grid-template-columns: 1fr;
  }

  .event-card__date {
    grid-auto-flow: column;
    justify-content: start;
    gap: 10px;
    padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .event-card__day {
    font-size: 1.3rem;
  }

  .big-countdown > div {
    min-width: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal,
  .js .reveal-again {
    opacity: 1;
  }
}

/* ——— Modulok: közös ——— */

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-head__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.side-scroll {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.side-label--admin {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--danger-text);
}

.status-dot--duty {
  background: #2fbf71;
}

.status-dot--leave {
  background: var(--warn);
}

.avatar-wrap--md {
  width: 44px;
  height: 44px;
}

.chip--sm {
  padding: 2px 7px;
  font-size: 0.64rem;
}

.btn-lg {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.86rem;
}

.btn-success {
  background: var(--ok);
  color: #fff;
}

.btn-success:hover {
  background: #1f9b62;
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-danger:hover {
  background: var(--red-hover);
}

.btn-ghost--danger:hover {
  color: var(--danger-text);
  border-color: rgba(180, 35, 47, 0.5);
  background: var(--red-soft);
}

.btn[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

a.tab {
  text-decoration: none;
}

.tabs--links .tab.is-active {
  background: var(--card-2);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--line);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 12px;
  font-size: 1rem;
}

.alert--wide {
  max-width: none;
  margin-bottom: 16px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid rgba(64, 87, 184, 0.45);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  background: rgba(64, 87, 184, 0.1);
  color: var(--silver);
  font-size: 0.86rem;
  line-height: 1.5;
}

.notice .icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: #8fa2ee;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.row-actions form,
.admin-event__actions form {
  display: inline-flex;
}

/* ——— Toast ——— */

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--card-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ok);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7);
  font-size: 0.88rem;
  animation: toastIn 0.45s var(--ease) both;
}

.toast--ok .icon {
  color: var(--ok-text);
}

.toast--error {
  border-left-color: var(--red);
}

.toast--error .icon {
  color: var(--danger-text);
}

.toast.is-hiding {
  opacity: 0;
  translate: 0 12px;
  transition: opacity 0.3s ease, translate 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; translate: 0 16px; }
  to { opacity: 1; translate: 0 0; }
}

/* ——— Kereső ——— */

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(420px, 100%);
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--faint);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search:focus-within {
  border-color: rgba(180, 35, 47, 0.6);
  box-shadow: 0 0 0 3px var(--red-soft);
  color: var(--text);
}

.search input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

[data-search-item][hidden],
[data-search-group][hidden] {
  display: none !important;
}

/* ——— Űrlapok ——— */

.form {
  display: grid;
  gap: 0;
  padding: 0;
}

.panel.form {
  overflow: hidden;
  padding: 0;
}

.form__section {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.form > .form-grid {
  padding: 20px 22px;
}

.form__section h3 {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  background: rgba(0, 0, 0, 0.12);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.form-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.field--wide {
  grid-column: 1 / -1;
}

.field__label {
  color: var(--silver);
  font-size: 0.8rem;
  font-weight: 600;
}

.field__label b {
  color: var(--danger-text);
}

.field__hint {
  color: var(--faint);
  font-size: 0.76rem;
}

.form__section > .field__hint {
  display: block;
  margin-top: 10px;
}

.input {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  color-scheme: dark;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.input:hover {
  border-color: #454a54;
}

.input:focus {
  outline: 0;
  border-color: rgba(180, 35, 47, 0.7);
  box-shadow: 0 0 0 3px var(--red-soft);
  background-color: #202227;
}

select.input {
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a7adb7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
}

select.input option {
  background: var(--card);
  color: var(--text);
}

textarea.input {
  resize: vertical;
  line-height: 1.55;
}

textarea.input.mono {
  font-family: var(--mono);
  font-size: 0.84rem;
}

.switches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.switch {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.switch:hover {
  border-color: #454a54;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch strong {
  display: block;
  font-size: 0.88rem;
}

.switch small {
  display: block;
  color: var(--faint);
  font-size: 0.76rem;
}

.switch__track {
  position: relative;
  flex-shrink: 0;
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: #3a3e46;
  transition: background 0.25s ease;
}

.switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.3s var(--ease);
}

.switch input:checked + .switch__track {
  background: var(--red);
}

.switch input:checked + .switch__track .switch__thumb {
  transform: translateX(16px);
}

.switch input:focus-visible + .switch__track {
  box-shadow: 0 0 0 3px var(--red-soft);
}

/* ——— Esemény jelentkezés ——— */

.rsvp-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rsvp-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease);
}

.rsvp-btn:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.rsvp-btn:active {
  transform: scale(0.97);
}

.rsvp-btn--ok:hover,
.rsvp-btn--ok.is-active {
  border-color: rgba(25, 135, 84, 0.6);
  background: rgba(25, 135, 84, 0.16);
  color: var(--ok-text);
}

.rsvp-btn--danger:hover,
.rsvp-btn--danger.is-active {
  border-color: rgba(180, 35, 47, 0.6);
  background: var(--red-soft);
  color: var(--danger-text);
}

.rsvp-btn--neutral:hover,
.rsvp-btn--neutral.is-active {
  border-color: rgba(167, 173, 183, 0.5);
  background: rgba(89, 97, 109, 0.25);
  color: var(--text);
}

.rsvp-btn.is-active {
  box-shadow: inset 0 0 0 1px currentColor;
}

.event-card.is-target {
  border-color: rgba(180, 35, 47, 0.7);
}

/* ——— Szolgálat ——— */

.duty-quick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color 0.3s ease;
}

.duty-quick.is-on {
  border-color: rgba(180, 35, 47, 0.5);
}

.duty-quick__status {
  display: flex;
  align-items: center;
  gap: 14px;
}

.duty-quick label {
  display: block;
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.duty-quick strong {
  display: block;
  font-size: 1rem;
}

.duty-timer {
  color: var(--danger-text);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.duty-light {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #4a4f58;
}

.duty-quick.is-on .duty-light,
.duty-console.is-on .duty-light {
  background: var(--red);
}

.people {
  display: grid;
  gap: 4px;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius);
  transition: background 0.2s ease;
}

.person:hover {
  background: rgba(255, 255, 255, 0.03);
}

.person--inline {
  padding: 0;
}

.person--inline:hover {
  background: none;
}

.person__text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.person__text strong {
  overflow: hidden;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person__text > span:not(.person__tags) {
  color: var(--faint);
  font-size: 0.76rem;
}

.person__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.bar-cell {
  position: relative;
  min-width: 180px;
}

.bar-cell strong {
  position: relative;
  font-variant-numeric: tabular-nums;
}

.hours-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.hours-bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 0%);
  background: linear-gradient(90deg, var(--red), #e05b66);
  animation: growBar 1s var(--ease) both;
  animation-delay: 0.3s;
}

/* ——— Heti összesítő ——— */

.board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(180, 35, 47, 0.14), transparent 55%),
    var(--card);
}

.board-head h2 {
  margin: 6px 0 4px;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.board-head p {
  margin: 0;
  max-width: 68ch;
  font-size: 0.86rem;
  line-height: 1.45;
}

.week-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.week-nav .icon-btn {
  width: 34px;
  height: 34px;
}

.icon-btn.is-disabled {
  opacity: 0.35;
  cursor: default;
}

.board-head__next {
  display: grid;
  justify-items: end;
  gap: 4px;
  flex-shrink: 0;
}

.board-head__next label {
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.board-head__next .countdown {
  font-size: 0.9rem;
}

.podium {
  display: grid;
  grid-template-columns: repeat(var(--n, 3), minmax(0, 300px));
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}

.podium__item {
  --medal: #c9932b;
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 22px 16px 18px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--medal);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--medal) 12%, transparent), transparent 70%),
    var(--card);
  text-align: center;
  transition: transform 0.3s var(--ease), border-color 0.25s ease;
}

.podium__item:hover {
  transform: translateY(-2px);
}

.podium__item--2 {
  --medal: #b8bec8;
}

.podium__item--3 {
  --medal: #b0703f;
}

.podium__item strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium__item .muted {
  font-size: 0.78rem;
}

.podium__place {
  position: absolute;
  top: 10px;
  left: 12px;
  color: var(--medal);
  font-size: 0.9rem;
  font-weight: 800;
}

.podium__avatar {
  width: 56px;
  height: 56px;
  margin-bottom: 6px;
  border: 2px solid var(--medal);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--medal) 18%, transparent);
}

.podium__minutes {
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--medal) 16%, transparent);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.board__place {
  width: 44px;
  color: var(--faint);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.board tbody tr:nth-child(1) .board__place {
  color: #e0b04a;
}

.board tbody tr:nth-child(2) .board__place {
  color: #c9ced6;
}

.board tbody tr:nth-child(3) .board__place {
  color: #c98250;
}

.board tbody tr.is-idle .board__place {
  color: var(--faint);
}

.board tr.is-me {
  background: rgba(180, 35, 47, 0.07);
}

.board tr.is-me td:first-child {
  box-shadow: inset 3px 0 0 var(--red);
}

.board tr.is-idle td:not(:first-child) {
  opacity: 0.6;
}

.board__bar {
  min-width: 200px;
}

.board__bar strong {
  display: block;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.week-bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.week-bar i {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--bar, var(--neutral));
  animation: growBar 0.9s var(--ease) both;
  animation-delay: 0.2s;
}

.week-bar--ok {
  --bar: linear-gradient(90deg, #198754, #3ccf86);
}

.week-bar--warn {
  --bar: linear-gradient(90deg, #a87a1f, #f0c46a);
}

.week-bar--danger {
  --bar: linear-gradient(90deg, var(--red), #e05b66);
}

.week-bar--neutral {
  --bar: linear-gradient(90deg, #59616d, #8b93a0);
}

@media (max-width: 700px) {
  .board-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .board-head__next {
    justify-items: start;
  }

  .podium {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ——— Állomány ——— */

.roster {
  display: grid;
  gap: 18px;
}

.rank-group {
  --rank: var(--silver);
}

.rank-group__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--rank) 65%, transparent);
}

.rank-group__bar {
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--rank);
}

.rank-group__head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

a.member {
  color: inherit;
  text-decoration: none;
}

.records-note {
  margin: 0 0 12px;
  font-size: 0.84rem;
  line-height: 1.45;
}

.log {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.log__item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}

.log__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.log__meta time {
  color: var(--faint);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.log__meta strong {
  font-size: 0.88rem;
}

.log__item p {
  margin: 0;
  color: var(--silver);
  line-height: 1.5;
}

.audit-table .audit-who {
  font-weight: 700;
  white-space: nowrap;
}

.audit-table .cell-stack strong {
  color: var(--text);
  font-size: 0.9rem;
}

.log-act {
  font-weight: 700;
}

.log-act--ok { color: var(--ok-text); }
.log-act--danger { color: var(--danger-text); }
.log-act--warn { color: var(--warn-text); }
.log-act--muted { color: var(--silver); }

.member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--rank);
  border-radius: var(--radius);
  background: var(--card);
  transition: transform 0.3s var(--ease), border-color 0.25s ease, box-shadow 0.3s ease;
}

.member:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.9);
}

.member__text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.member__text strong {
  overflow: hidden;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member__text span {
  overflow: hidden;
  color: var(--faint);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member__body {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 6px;
}

.member.is-inactive {
  position: relative;
  overflow: hidden;
  border-color: transparent;
}

.member.is-inactive::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: rgb(18 19 23 / 10%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
}

.member.is-inactive > :not(.member__inactive) {
  filter: blur(4px);
  transform: scale(1.03);
}

.member__inactive {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 12px;
  text-align: center;
  pointer-events: none;
}

.member__inactive strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.member__inactive span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.35;
}

/* ——— Tudásbázis ——— */

.sop-group + .sop-group {
  margin-top: 22px;
}

.sop-group__title {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.sop-card {
  position: relative;
  display: grid;
  gap: 8px;
  align-content: center;
  justify-items: center;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-align: center;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.25s ease, box-shadow 0.3s ease;
}

.sop-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--red);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s var(--ease);
}

.sop-card:hover {
  transform: translateY(-2px);
  border-color: #464b55;
  box-shadow: 0 18px 34px -22px rgba(0, 0, 0, 0.9);
}

.sop-card:hover::before {
  transform: scaleY(1);
}

.sop-card__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--red-soft);
  color: var(--danger-text);
}

.sop-card strong {
  font-size: 0.98rem;
}

.sop-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.sop-card__meta {
  color: var(--faint);
  font-size: 0.74rem;
}

.article {
  padding: 26px 30px;
}

.article__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.82rem;
}

.prose {
  max-width: 820px;
  color: #dfe2e7;
  font-size: 0.95rem;
  line-height: 1.7;
}

.article .prose {
  max-width: none;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2,
.prose h3,
.prose h4 {
  margin: 1.6em 0 0.5em;
  color: var(--text);
  line-height: 1.3;
}

.prose h2 {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 1.2rem;
}

.prose h3 {
  font-size: 1.05rem;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1em;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 4px;
}

.prose li::marker {
  color: var(--red);
}

.prose strong {
  color: var(--text);
}

.prose code {
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.85em;
}

.prose blockquote {
  margin: 0 0 1em;
  padding: 10px 14px;
  border-left: 3px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--red-soft);
  color: var(--silver);
}

.prose hr {
  margin: 1.6em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

/* ——— Admin ——— */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

@media (max-width: 1280px) {
  .tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .tile-grid {
    grid-template-columns: 1fr;
  }
}

.action-tile {
  position: relative;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.25s ease, box-shadow 0.3s ease;
}

.action-tile:hover {
  border-color: rgba(180, 35, 47, 0.55);
}

.action-tile__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--red-soft);
  color: var(--danger-text);
  transition: transform 0.35s var(--ease);
}

.action-tile:hover .action-tile__icon {
  transform: scale(1.08) rotate(-4deg);
}

.action-tile strong {
  font-size: 1rem;
}

.action-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.action-tile__go {
  position: absolute;
  top: 20px;
  right: 18px;
  color: var(--faint);
  transition: transform 0.3s var(--ease), color 0.2s ease;
}

.action-tile:hover .action-tile__go {
  color: var(--text);
  transform: translateX(4px);
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-event {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color 0.25s ease;
}

.admin-event:hover {
  border-color: #454a54;
}

.admin-event__main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
}

.admin-event__date {
  display: grid;
  justify-items: center;
  min-width: 58px;
  padding: 8px 6px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-event__date b {
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1.1;
}

.admin-event__date span {
  margin-top: 2px;
  color: var(--faint);
  font-family: var(--mono);
}

.admin-event__info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-event__info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-event__info .muted {
  font-size: 0.8rem;
}

.admin-event__head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-event__counts {
  display: flex;
  gap: 6px;
}

.count {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.count--ok {
  background: rgba(25, 135, 84, 0.15);
  color: var(--ok-text);
}

.count--danger {
  background: var(--red-soft);
  color: var(--danger-text);
}

.count--neutral {
  background: rgba(89, 97, 109, 0.25);
  color: var(--silver);
}

.admin-event__actions {
  display: flex;
  gap: 6px;
}

.admin-event__details summary,
.review__answers summary {
  padding: 10px 18px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}

.admin-event__details summary::-webkit-details-marker,
.review__answers summary::-webkit-details-marker {
  display: none;
}

.admin-event__details summary::before,
.review__answers summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.25s var(--ease);
}

.admin-event__details[open] summary::before,
.review__answers[open] summary::before {
  transform: rotate(90deg);
}

.admin-event__details summary:hover,
.review__answers summary:hover {
  color: var(--text);
}

.attendees {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 4px 18px 18px;
  animation: fadeIn 0.3s ease both;
}

.attendees h4 {
  margin: 0 0 8px;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.attendees h4.ok { color: var(--ok-text); }
.attendees h4.danger { color: var(--danger-text); }
.attendees h4.neutral { color: var(--silver); }

.names {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
}

.names li {
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.exam-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px 24px;
  border-left: 3px solid var(--neutral);
}

.exam-switch.is-on {
  border-left-color: var(--ok);
}

.exam-switch h2 {
  margin: 6px 0 4px;
  font-size: 1.4rem;
}

.exam-switch p {
  margin: 0;
}

.review-list {
  display: grid;
  gap: 12px;
}

.review {
  padding: 0;
  overflow: hidden;
}

.review__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
}

.review__head > div {
  display: grid;
  flex: 1;
}

.review__head .muted {
  font-size: 0.8rem;
}

.score {
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.score small {
  margin-left: 3px;
  color: var(--faint);
  font-size: 0.85rem;
  font-weight: 600;
}

.answers {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 4px 18px 16px 40px;
  font-size: 0.86rem;
}

.answers li {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border-left: 2px solid var(--ok);
}

.answers li.is-wrong {
  border-left-color: var(--red);
}

.answers li span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.answers li.is-correct span .icon { color: var(--ok-text); }
.answers li.is-wrong span .icon { color: var(--danger-text); }

.review__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.12);
}

.review__form .input {
  flex: 1;
  min-height: 34px;
}

@media (max-width: 1080px) {
  .form-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-event__main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .admin-event__counts,
  .admin-event__actions {
    grid-column: 2;
  }
}

@media (max-width: 780px) {
  .form-grid,
  .form-grid--4,
  .attendees {
    grid-template-columns: 1fr;
  }

  .review__form {
    flex-wrap: wrap;
  }

  .duty-console {
    padding: 22px;
  }

  .toast {
    right: 16px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
}

/* ——— Szolgálat: kompakt sáv ——— */

.duty-console {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.duty-console.is-on {
  border-color: rgba(180, 35, 47, 0.5);
}

.duty-console__main {
  display: grid;
  flex: 1;
  min-width: 200px;
}

.duty-console__label {
  font-weight: 700;
  font-size: 0.92rem;
}

.duty-console__main .muted {
  font-size: 0.8rem;
}

.duty-clock {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ——— Panel (dialog) ——— */

.modal {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.modal[open] {
  animation: fadeIn 0.15s ease both;
}

.modal__body {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal__head h3 {
  margin: 0;
  font-size: 1rem;
}

.modal__head .icon-btn {
  width: 30px;
  height: 30px;
}

.modal__time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

.modal__time strong {
  color: var(--text);
  font-size: 1.1rem;
}

.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal--confirm {
  width: min(420px, calc(100vw - 32px));
}

.confirm__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.upload {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 148px;
  padding: 18px 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload:hover,
.upload:focus-visible,
.upload.is-dragover {
  border-color: rgba(180, 35, 47, 0.7);
  background: rgba(180, 35, 47, 0.06);
}

.upload.is-filled {
  border-style: solid;
  border-color: #555b66;
  padding: 8px;
}

.upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.upload [hidden] {
  display: none !important;
}

.upload__hint {
  display: grid;
  justify-items: center;
  gap: 6px;
  max-width: 28rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

.upload__hint strong {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

.upload__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 2px;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--danger-text);
}

.upload__actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
  color: var(--faint);
  font-size: 0.74rem;
}

.upload__actions kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  color: var(--muted);
  font: inherit;
  font-size: 0.7rem;
  line-height: 1.4;
}

/* ——— Szolgálatok kezelése ——— */

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  text-align: center;
}

.tabs--sm .tab {
  padding: 4px 10px;
  font-size: 0.76rem;
}

.panel--spaced {
  margin-top: 18px;
}

.shift-list {
  display: grid;
  gap: 12px;
}

.shift-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.shift {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: 14px 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.shift__who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.shift__times {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
}

.shift__times dt {
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shift__times dd {
  margin: 0;
  font-size: 0.84rem;
}

.shift__proofs {
  display: flex;
  gap: 8px;
}

.proof {
  position: relative;
  display: grid;
  width: 92px;
  height: 60px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  color: var(--faint);
  font-size: 0.68rem;
  text-decoration: none;
}

.proof img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.proof:hover img {
  opacity: 0.8;
}

.proof span {
  position: absolute;
  inset: auto 0 0;
  padding: 2px 5px;
  background: rgba(0, 0, 0, 0.65);
  color: var(--silver);
  font-size: 0.64rem;
}

.proof--missing {
  place-items: center;
  padding-bottom: 14px;
}

.shift__form,
.shift__review {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.shift__form .input {
  flex: 1;
  min-height: 30px;
  padding: 5px 10px;
  font-size: 0.82rem;
}

.shift__review .muted {
  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .shift {
    grid-template-columns: 1fr;
  }

  .shift__form {
    flex-wrap: wrap;
  }
}

/* ——— Heti kötelező szolgálat ——— */

.quota {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  --tone: var(--neutral);
}

.quota--ok { --tone: var(--ok); }
.quota--warn { --tone: var(--warn); }
.quota--danger { --tone: var(--red); }

.quota-meter {
  flex: 1 1 280px;
  max-width: 460px;
  display: grid;
  gap: 6px;
}

.quota-meter__head,
.quota-meter__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.quota-meter__head span {
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quota-meter__head b {
  color: var(--tone);
  font-size: 0.86rem;
}

.quota-meter__bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.quota-meter__done {
  background: var(--tone);
  transition: width 0.6s var(--ease);
}

.quota-meter__pending {
  background: var(--tone);
  opacity: 0.35;
}

.quota-meter__meta {
  color: var(--muted);
  font-size: 0.74rem;
}

.quota-meter__meta b {
  color: var(--text);
}

.quota-meter--off {
  font-size: 0.8rem;
}

.quota__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.quota__head .muted {
  font-size: 0.8rem;
}

.quota__pct {
  color: var(--tone);
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.quota__bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.quota__bar span {
  display: block;
  height: 100%;
  background: var(--tone);
  transition: width 0.6s var(--ease);
}

.quota__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.8rem;
}

.quota__meta b {
  color: var(--text);
}

.quota-chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.quota-chip--ok { background: rgba(25, 135, 84, 0.15); color: var(--ok-text); }
.quota-chip--warn { background: rgba(201, 147, 43, 0.15); color: var(--warn-text); }
.quota-chip--danger { background: var(--red-soft); color: var(--danger-text); }

.settings__form {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.settings__form .field {
  flex: 1;
  min-width: 240px;
  max-width: 420px;
}

.settings__form .btn {
  margin-top: 24px;
}

.minutes-input {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 110px;
}

.minutes-input .input {
  width: 110px;
  padding-right: 40px;
}

.minutes-input span {
  position: absolute;
  right: 10px;
  color: var(--faint);
  font-size: 0.76rem;
  pointer-events: none;
}

.shift__review + .shift__form {
  border-top: 0;
  padding-top: 0;
}

/* ——— BB-kód szerkesztő és tartalom ——— */

.bb-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface);
}

.bb-toolbar__group {
  display: inline-flex;
  gap: 2px;
  padding-right: 6px;
  border-right: 1px solid var(--line);
}

.bb-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}

.bb-btn--icon {
  justify-content: center;
  width: 28px;
  min-height: 28px;
  padding: 0;
}

.bb-btn:hover {
  background: var(--card-2);
  color: var(--text);
}

.bb-btn--preview {
  margin-left: auto;
  border-color: var(--line);
}

.bb-btn--preview.is-active {
  border-color: rgba(180, 35, 47, 0.6);
  color: var(--text);
}

.bb-editor textarea,
.bb-preview {
  border-radius: 0 0 var(--radius) var(--radius);
}

.bb-preview {
  max-width: none;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.prose u {
  text-decoration-color: currentColor;
}

.prose img {
  max-width: 100%;
  border-radius: var(--radius-sm);
}

.prose blockquote cite {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 700;
}

.prose pre {
  margin: 0 0 1em;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow-x: auto;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  white-space: pre;
}

.bb-table {
  margin: 0 0 1em;
  overflow-x: auto;
}

.bb-table table {
  border-collapse: collapse;
  min-width: 50%;
  font-size: 0.9rem;
}

.bb-table th,
.bb-table td {
  padding: 8px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.bb-table th {
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
}

.bb-box {
  --box: var(--silver);
  margin: 0 0 1em;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--box);
  border-radius: var(--radius);
  background: var(--surface);
}

.prose details {
  margin: 0 0 1em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.prose details summary {
  padding: 8px 12px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.prose details > div {
  padding: 4px 12px 12px;
}

/* ——— Dokumentum szerkesztő: formázott nézet, kép méretezés ——— */

.bb-visual {
  max-width: none;
  min-height: 460px;
  max-height: 72vh;
  padding: 16px 18px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
  outline: none;
  cursor: text;
}

.bb-visual:focus {
  border-color: rgba(180, 35, 47, 0.55);
}

.bb-visual[hidden],
.bb-source[hidden] {
  display: none;
}

.bb-source {
  min-height: 460px;
  resize: vertical;
}

.bb-visual details summary {
  cursor: text;
}

.bb-size,
.bb-color {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bb-size {
  flex-direction: column;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
}

.bb-size:hover,
.bb-color__open:hover {
  background: var(--card-2);
  color: var(--text);
}

.bb-size select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.bb-color__open {
  flex-direction: column;
  width: 28px;
  height: 28px;
  padding: 0;
}

.bb-color__pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 10px;
  width: 280px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.bb-color__pop[hidden] {
  display: none;
}

.bb-color__pop input[type='color'] {
  width: 100%;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.bb-color__codes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bb-color__codes label {
  display: grid;
  gap: 4px;
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.bb-color__codes .input {
  min-height: 32px;
  padding: 6px 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0;
  font-weight: 500;
}

.bb-color__pop .btn {
  justify-self: end;
}

.bb-size select option {
  background: var(--card);
  color: var(--text);
}

.bb-color .icon {
  margin-top: -3px;
}

.bb-color__bar {
  width: 16px;
  height: 3px;
  margin-top: 1px;
  border-radius: 2px;
  background: var(--swatch, #b4232f);
}

.bb-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 0 8px;
  color: var(--muted);
  cursor: pointer;
}

.bb-mode input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bb-mode .switch__track {
  width: 30px;
  height: 18px;
  border-radius: 9px;
}

.bb-mode .switch__thumb {
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
}

.bb-mode input:checked + .switch__track {
  background: var(--red);
}

.bb-mode input:checked + .switch__track .switch__thumb {
  transform: translateX(12px);
}

.bb-mode input:checked ~ .icon {
  color: var(--text);
}

.bb-btn--image {
  margin-left: auto;
  color: var(--text);
}

.bb-resize {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
  vertical-align: top;
}

.bb-resize img {
  display: block;
  max-width: 100%;
  outline: 1px dashed transparent;
  outline-offset: 2px;
}

.bb-resize:hover img,
.bb-resize.is-resizing img {
  outline-color: rgba(180, 35, 47, 0.8);
}

.bb-resize__handle {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid #fff;
  border-radius: 2px;
  background: var(--red);
  opacity: 0;
  touch-action: none;
  transition: opacity 0.15s ease;
}

.bb-resize:hover .bb-resize__handle,
.bb-resize.is-resizing .bb-resize__handle {
  opacity: 1;
}

.bb-resize__handle--nw { top: -5px; left: -5px; cursor: nwse-resize; }
.bb-resize__handle--ne { top: -5px; right: -5px; cursor: nesw-resize; }
.bb-resize__handle--sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
.bb-resize__handle--se { right: -5px; bottom: -5px; cursor: nwse-resize; }

.bb-resize__size {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
}

.bb-resize.is-resizing .bb-resize__size {
  opacity: 1;
}

.modal__or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--faint);
  font-size: 0.74rem;
}

.modal__or::before,
.modal__or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

/* ——— Közös kiegészítések ——— */

.dot--warn {
  background: var(--warn);
}

.dot--leave {
  background: var(--blue);
}

.field[hidden],
.table tbody tr[hidden] {
  display: none;
}

.form-grid--1 {
  grid-template-columns: minmax(0, 1fr);
}

.form-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.switches--stack {
  grid-template-columns: minmax(0, 1fr);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  cursor: pointer;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
}

a.person--link:hover strong {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ——— Automatizálás ——— */

.auto-lead {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.auto-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auto-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
}

.auto-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.auto-row__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--line-soft);
}

.auto-row__icon .icon {
  width: 15px;
  height: 15px;
}

.auto-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.auto-row__head strong {
  font-size: 0.86rem;
}

.auto-row__body > p {
  margin: 2px 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.auto-channel {
  display: grid;
  gap: 4px;
}

.auto-channel__name {
  font-weight: 650;
  font-size: 0.82rem;
  color: var(--text);
}

.auto-channel__name.is-raw {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.auto-channel__name.is-off {
  color: var(--faint);
  font-weight: 550;
}

.auto-channel__note {
  color: var(--faint);
  font-size: 0.72rem;
  line-height: 1.35;
}

.auto-channel input,
.auto-hours input {
  width: 100%;
  min-height: 30px;
  padding: 4px 8px;
  font-size: 0.76rem;
}

.auto-channel input {
  font-family: var(--mono);
}

.auto-extra {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.auto-extra .switch {
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.auto-extra .switch strong {
  font-size: 0.78rem;
}

.auto-extra .switch small {
  font-size: 0.7rem;
  line-height: 1.3;
}

.auto-send {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.auto-send .check {
  font-size: 0.76rem;
}

.auto-hours {
  display: grid;
  grid-template-columns: auto 64px auto;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.76rem;
}

.auto-hours input {
  width: 64px;
}

.automation .form__actions {
  order: 1;
  padding: 2px 0 0;
  background: none;
}

@media (max-width: 900px) {
  .auto-grid {
    grid-template-columns: 1fr;
  }
}

/* ——— Statisztika grafikon ——— */

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--muted);
  font-size: 0.76rem;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stats-panel__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 20px;
  align-items: stretch;
}

.chart {
  min-width: 0;
  padding: 8px 0 0;
}

.chart__plot {
  position: relative;
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 6px;
  height: 220px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  background-image: linear-gradient(to top, var(--line-soft) 1px, transparent 1px);
  background-size: 100% 25%;
  background-position: 0 -24px;
}

.chart__line {
  position: absolute;
  right: 0;
  left: 0;
  bottom: calc(24px + (100% - 42px) * var(--y));
  z-index: 1;
  border-top: 1px dashed rgba(240, 196, 106, 0.7);
  pointer-events: none;
}

.chart__line b {
  position: absolute;
  left: 0;
  bottom: 3px;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: rgba(18, 19, 23, 0.85);
  color: var(--warn-text);
  font-size: 0.68rem;
  font-weight: 600;
}

.chart__col {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  height: 100%;
  padding-top: 18px;
}

.chart__bar {
  flex-shrink: 0;
  width: min(100%, 34px);
  height: var(--h);
  min-height: 0;
  border-radius: 3px 3px 0 0;
  background: var(--neutral);
  transform-origin: bottom;
  animation: bar-grow 0.7s var(--ease) both;
  animation-delay: var(--d);
  transition: filter 0.2s ease;
}

.chart__col:hover .chart__bar {
  filter: brightness(1.25);
}

.chart__bar--ok { background: linear-gradient(to top, #146c43, #3ccf86); }
.chart__bar--warn { background: linear-gradient(to top, #8a6418, #f0c46a); }
.chart__bar--danger { background: linear-gradient(to top, #8e1b25, #e05b66); }
.chart__bar--leave { background: linear-gradient(to top, #2f418c, #6f86e8); }
.chart__bar--neutral { background: linear-gradient(to top, #454b55, #8b93a0); }

.chart__col.is-current .chart__bar {
  position: relative;
  outline: 1px dashed rgba(255, 255, 255, 0.4);
  outline-offset: -1px;
}

.chart__col.is-current .chart__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0 6px, transparent 6px 12px);
}

.chart__value {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chart__label {
  position: absolute;
  bottom: -22px;
  overflow: hidden;
  max-width: 100%;
  color: var(--faint);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart__col.is-current .chart__label {
  color: var(--text);
  font-weight: 600;
}

@keyframes bar-grow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.facts > div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--red);
  border-radius: var(--radius);
  background: var(--surface);
}

.facts dt {
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.facts span {
  color: var(--muted);
  font-size: 0.74rem;
}

@media (max-width: 900px) {
  .stats-panel__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .chart__value {
    display: none;
  }

  .chart__plot {
    gap: 3px;
  }

  .chart__col:not(:nth-child(3n + 1)):not(.is-current) .chart__label {
    visibility: hidden;
  }

  .stats-panel .panel__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ——— Idővonal (tagadatlap) ——— */

.timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline__item {
  --tone: var(--neutral);
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 16px;
}

.timeline__item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 0;
  left: 14px;
  width: 2px;
  background: var(--line);
}

.timeline__item--ok { --tone: var(--ok-text); }
.timeline__item--warn { --tone: var(--warn-text); }
.timeline__item--gold { --tone: #f0c46a; }
.timeline__item--blue { --tone: #8da0f0; }
.timeline__item--danger { --tone: var(--danger-text); }
.timeline__item--muted { --tone: var(--faint); }

.timeline__dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--tone) 14%, var(--card));
  color: var(--tone);
}

.timeline__body {
  min-width: 0;
  padding-top: 4px;
}

.timeline__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}

.timeline__head strong {
  color: var(--tone);
  font-size: 0.88rem;
}

.timeline__head .muted {
  font-size: 0.76rem;
}

.timeline__delete {
  margin-left: auto;
}

.timeline__body p {
  margin: 6px 0 0;
  color: var(--silver);
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.timeline__item.is-expired {
  opacity: 0.55;
}

.records-scroll {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--red) rgba(255, 255, 255, 0.05);
}

.records-scroll::-webkit-scrollbar {
  width: 10px;
}

.records-scroll::-webkit-scrollbar-track {
  margin: 6px 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
}

.records-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d24a56, var(--red));
  border: 2px solid var(--card);
  border-radius: 99px;
}

.records-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--red-hover);
}

/* ——— Szabadság ——— */

.leave-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 14px 18px;
  border: 1px solid rgba(64, 87, 184, 0.45);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(64, 87, 184, 0.18), rgba(64, 87, 184, 0.04));
}

.leave-banner__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(64, 87, 184, 0.25);
  color: #aab9ff;
}

.leave-banner div {
  display: grid;
  gap: 2px;
}

.leave-banner span:not(.leave-banner__icon) {
  color: var(--muted);
  font-size: 0.85rem;
}

.leave-form__main {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 22px 24px 18px;
}

.leave-form__lead h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.leave-form__lead p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.leave-form__fields {
  display: grid;
  grid-template-columns: minmax(11.5rem, 1fr) minmax(11.5rem, 1fr);
  gap: 14px 16px;
}

.leave-form__fields .field {
  min-width: 0;
}

.leave-form__reason {
  grid-column: 1 / -1;
}

.date-field {
  position: relative;
  display: block;
}

.date-field__value {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.date-field__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  text-align: left;
  font-weight: 500;
  color: var(--faint);
}

.date-field__btn .icon {
  color: var(--muted);
}

.date-field.is-set .date-field__btn {
  color: var(--text);
}

.date-field.is-open .date-field__btn,
.date-field:focus-within .date-field__btn {
  border-color: rgba(180, 35, 47, 0.7);
  box-shadow: 0 0 0 3px var(--red-soft);
  background-color: #202227;
}

.date-pop {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  width: 292px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-2);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8);
}

.date-pop[hidden] {
  display: none;
}

.date-pop__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.date-pop__head strong {
  font-size: 0.9rem;
  font-weight: 700;
}

.date-pop__nav {
  display: flex;
  gap: 4px;
}

.date-pop__nav button,
.date-pop__grid button {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.date-pop__nav button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.date-pop__nav button:disabled {
  opacity: 0.35;
  cursor: default;
}

.date-pop__week,
.date-pop__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.date-pop__week span {
  padding: 4px 0;
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
}

.date-pop__grid button {
  height: 32px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.date-pop__grid button:hover:not(:disabled) {
  background: var(--surface);
}

.date-pop__grid button.is-out {
  color: var(--faint);
}

.date-pop__grid button.is-today {
  box-shadow: inset 0 0 0 1px var(--red);
}

.date-pop__grid button.is-selected {
  background: var(--red);
  color: #fff;
}

.date-pop__grid button:disabled {
  color: #4c525c;
  cursor: default;
}

.leave-card {
  padding: 0;
  overflow: hidden;
}

.leave-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 14px 18px 0;
}

.leave-card__range {
  display: grid;
  gap: 2px;
  text-align: right;
}

.leave-card__range .muted {
  font-size: 0.76rem;
}

.leave-card__reason {
  margin: 10px 18px 12px;
  padding: 10px 12px;
  border-left: 2px solid var(--line);
  background: var(--surface);
  color: var(--silver);
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-line;
}

/* ——— Közlemények ——— */

.news {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.news-card {
  --tone: #8da0f0;
  display: flex;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--tone);
  border-radius: var(--radius);
  background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 10%, var(--card)), var(--card) 60%);
}

.news-card--important { --tone: var(--warn); }
.news-card--urgent { --tone: var(--red); }

.news-card__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tone) 22%, transparent);
  color: color-mix(in srgb, var(--tone) 60%, #fff);
}

.news-card__body {
  flex: 1;
  min-width: 0;
}

.news-card__body header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
}

.news-card__body header span {
  color: var(--faint);
  font-size: 0.76rem;
}

.news-card .prose,
.news-item__body {
  margin-top: 6px;
  color: var(--silver);
  font-size: 0.9rem;
}

.news-card .prose > :first-child,
.news-item__body > :first-child {
  margin-top: 0;
}

.news-card .prose > :last-child,
.news-item__body > :last-child {
  margin-bottom: 0;
}

.news-list {
  display: grid;
  gap: 12px;
  align-content: start;
}

.news-item {
  border-left: 3px solid #8da0f0;
}

.news-item--important { border-left-color: var(--warn); }
.news-item--urgent { border-left-color: var(--red); }

.news-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.news-item__head > div:first-child {
  display: grid;
  gap: 2px;
}

.news-item__head .muted {
  font-size: 0.76rem;
}

.news-item__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* ——— Hibaoldal ——— */

body.is-error .login-shell {
  overflow: hidden;
  background:
    radial-gradient(600px 380px at 50% 38%, rgba(180, 35, 47, 0.16), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.015) 0 22px, transparent 22px 44px);
}

.error-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(560px, 100%);
  padding: 44px 40px 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: var(--radius);
  background: rgba(35, 37, 42, 0.94);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.75);
  text-align: center;
  animation: scaleIn 0.7s var(--ease) both;
}

.error-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: error-sweep 3.2s var(--ease) 0.6s infinite;
}

.error-card__code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 4px 0 2px;
  color: var(--text);
  font-size: clamp(4rem, 14vw, 6.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.error-card__siren {
  position: relative;
  display: grid;
  place-items: center;
  width: 0.92em;
  height: 0.92em;
  border: 2px solid rgba(180, 35, 47, 0.55);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 35, 47, 0.35), rgba(180, 35, 47, 0.08) 70%);
  color: #ff8f99;
}

.error-card__siren::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid rgba(224, 91, 102, 0.6);
  border-radius: 50%;
  animation: error-pulse 1.8s ease-out infinite;
}

.error-card .eyebrow {
  justify-content: center;
}

.error-card h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
}

.error-card p {
  max-width: 400px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.error-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.error-card__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.error-card__links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--silver);
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease);
}

.error-card__links a:hover {
  border-color: rgba(180, 35, 47, 0.6);
  color: var(--text);
  transform: translateY(-1px);
}

@keyframes error-pulse {
  from { opacity: 0.9; transform: scale(1); }
  to { opacity: 0; transform: scale(1.6); }
}

@keyframes error-sweep {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .error-card::before,
  .error-card__siren::after {
    animation: none;
  }
}

@media (max-width: 520px) {
  .error-card {
    padding: 34px 20px 26px;
  }

  .error-card__links {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ——— Discord rangfigyelés ——— */

.role-sync__intro {
  max-width: 820px;
  margin: -4px 0 16px;
  font-size: 0.86rem;
  line-height: 1.6;
}

.role-sync__intro strong {
  color: var(--text);
}

.role-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 8px;
}

.role-pick {
  --role: var(--neutral);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.role-pick.is-rank {
  border-left-color: var(--ok);
  background: linear-gradient(90deg, rgba(25, 135, 84, 0.12), var(--surface) 70%);
}

.role-pick.is-qualification {
  border-left-color: var(--blue);
  background: linear-gradient(90deg, rgba(64, 87, 184, 0.14), var(--surface) 70%);
}

.role-pick__name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-pick__name i {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--role);
}

.role-pick .input {
  flex-shrink: 0;
  width: 136px;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 0.8rem;
}

.role-sync__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.role-sync__foot .switch {
  flex: 1 1 320px;
  max-width: 520px;
}

/* ——— Tagadatlap ——— */

.member-file__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.member-file__head h2 {
  margin: 0;
  font-size: 1.3rem;
}

.member-file__head p {
  margin: 4px 0 0;
}

.member-file__quota {
  margin-left: auto;
}

@media (max-width: 900px) {
  .form-grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .leave-form__main {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .leave-form__fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .leave-card__range {
    text-align: left;
  }

  .news-card {
    padding: 12px 14px;
  }

  .news-card__icon {
    display: none;
  }

  .member-file__quota {
    margin-left: 0;
  }
}

/* A szekciók közötti távolságot a .page gap adja, a saját felső margó ne duplázza. */
.page > * {
  margin-top: 0;
}

.main {
  min-height: 100vh;
}

.content {
  flex: 1;
  padding-bottom: 28px;
}

.site-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 22px;
  padding: 12px 32px 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 0.75rem;
  line-height: 1.4;
}

.site-foot__brand {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-foot__notes {
  display: flex;
  flex: 1 1 280px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-foot__notes li + li::before {
  content: "·";
  margin: 0 8px;
  color: var(--faint);
}

.site-foot nav {
  display: flex;
  gap: 2px;
}

.site-foot a {
  color: var(--muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
}

.site-foot a:hover {
  color: var(--text);
  background: var(--surface);
}

body.is-login .site-foot {
  padding: 12px 24px 14px;
}

body.is-exam {
  background: var(--bg);
}

.exam-shell {
  min-height: 100vh;
  display: grid;
  justify-items: center;
  align-content: start;
  padding: 40px 16px 72px;
}

.exam-card {
  width: min(760px, 100%);
  padding: 28px 24px 24px;
}

.exam-card h1 {
  margin: 8px 0 10px;
}

.exam-card > p {
  color: var(--muted);
  line-height: 1.55;
}

.exam-q {
  margin: 22px 0 0;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.exam-q legend {
  font-weight: 650;
  padding: 0;
  line-height: 1.45;
}

.exam-opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  cursor: pointer;
}

.exam-opt:has(input:checked) {
  border-color: var(--red);
  background: var(--red-soft);
}

.exam-opt input {
  margin-top: 3px;
}

.exam-form .btn {
  margin-top: 22px;
}

.exam-form .alert {
  margin-top: 16px;
}

@media (max-width: 900px) {
  .site-foot {
    justify-content: center;
    padding: 12px 16px 14px;
    text-align: center;
  }

  .site-foot__brand,
  .site-foot nav {
    white-space: normal;
  }
}
