/* VÁV Flotta – shell és komponensek. Színek kizárólag a tokens.css változóiból. */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

p {
  margin: 0 0 var(--space-3);
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

::selection {
  background: var(--periwinkle-soft);
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-2);
  z-index: 100;
  background: var(--surface);
  color: var(--ink);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.skip-link:focus {
  left: var(--space-3);
}

.icon {
  flex: 0 0 auto;
  stroke-width: 1.8;
}

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

.mono {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-variant-ligatures: none;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: var(--space-4) 0;
}

.kbd {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  background: var(--surface-2);
}

/* Téma-kapcsoló ikonjai: világos témában hold, sötétben nap látszik. */
[data-theme-toggle] .icon-moon {
  display: none;
}

:root[data-theme="dark"] [data-theme-toggle] .icon-sun {
  display: none;
}

:root[data-theme="dark"] [data-theme-toggle] .icon-moon {
  display: block;
}

/* --- Shell ---------------------------------------------------------------- */

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

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-3) var(--space-4);
  background: linear-gradient(180deg, var(--rail-bg-2), var(--rail-bg) 55%);
  color: var(--rail-ink);
  overflow-y: auto;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-2) var(--space-2);
  color: var(--rail-ink);
  text-decoration: none;
}

.sidebar__brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sidebar__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.sidebar__brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
}

.env-chip {
  align-self: flex-start;
  margin-top: 2px;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 12%);
  color: var(--rail-muted);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.nav-group__label {
  margin: 0 0 var(--space-1);
  padding: 0 var(--space-3);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rail-muted);
}

.nav-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--control-height-touch);
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--rail-ink);
  font-weight: 500;
  text-decoration: none;
}

.nav-link:hover {
  background: rgb(255 255 255 / 7%);
  text-decoration: none;
  color: var(--on-rail-strong);
}

.nav-link.is-active {
  background: rgb(255 255 255 / 10%);
  color: var(--on-rail-strong);
  font-weight: 600;
}

.nav-link.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.nav-link.is-active .icon {
  color: var(--accent);
}

.sidebar :focus-visible {
  outline-color: var(--focus-rail);
}

.nav-link--button {
  width: 100%;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}

.sidebar__footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  border-top: 1px solid rgb(255 255 255 / 10%);
  padding-top: var(--space-3);
}

.user-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 6%);
}

.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--periwinkle);
  color: var(--on-periwinkle);
  font-weight: 700;
  font-size: 0.82rem;
}

.user-card__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.user-card__name {
  font-weight: 600;
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-pill {
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rail-muted);
}

.sidebar__meta {
  margin: 0;
  padding: 0 var(--space-2);
  font-size: 0.68rem;
  color: var(--rail-muted);
  font-family: var(--font-mono);
}

.sidebar__scrim {
  display: none;
}


.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--topbar-h);
  padding: 0 var(--space-8);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.topbar__menu {
  display: none;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.breadcrumb__current {
  color: var(--ink);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.app-main {
  width: 100%;
  max-width: 1440px;
  padding: var(--space-6) var(--space-8) var(--space-10);
}

.public-main {
  min-height: 100vh;
  padding: var(--space-6) var(--space-4) var(--space-10);
}

.public-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
}

.public-shell .public-main {
  min-height: 0;
}

.public-shell .public-topbar {
  width: 100%;
  padding: var(--space-5) var(--space-4) 0;
}

.public-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  max-width: 1280px;
  margin: 0 auto var(--space-6);
}

.public-topbar__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
}

.public-topbar__brand:hover {
  text-decoration: none;
}

.mobile-tabbar {
  display: none;
}

@media (max-width: 1023px) {
  .app-shell {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .sidebar {
    align-items: center;
  }

  .sidebar__brand-text,
  .nav-group__label,
  .nav-link__label,
  .user-card__meta,
  .sidebar__meta {
    display: none;
  }

  .nav-link {
    justify-content: center;
    padding: 0;
  }

  .topbar,
  .app-main {
    padding-left: var(--space-5);
    padding-right: var(--space-5);
  }
}

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

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(84vw, 300px);
    align-items: stretch;
    transform: translateX(-100%);
    transition: transform 160ms ease;
    box-shadow: var(--shadow-md);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar.is-open .sidebar__brand-text,
  .sidebar.is-open .nav-group__label,
  .sidebar.is-open .user-card__meta,
  .sidebar.is-open .sidebar__meta {
    display: flex;
  }

  .sidebar.is-open .nav-link {
    justify-content: flex-start;
    padding: 0 var(--space-3);
  }

  .sidebar__scrim {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: block;
    background: rgb(20 10 14 / 55%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
    border: 0;
    padding: 0;
  }

  .sidebar__scrim.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .topbar {
    padding: 0 var(--space-4);
    min-height: 56px;
  }

  .topbar__menu {
    display: inline-flex;
  }

  .topbar__cta span {
    display: none;
  }

  .app-main {
    padding: var(--space-4) var(--space-4) calc(var(--space-10) + env(safe-area-inset-bottom));
  }

  .mobile-tabbar {
    position: fixed;
    inset: auto 0 0;
    z-index: 25;
    display: flex;
    justify-content: space-around;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2) calc(var(--space-1) + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--line);
  }

  .mobile-tabbar__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 56px;
    min-height: var(--control-height-touch);
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 600;
    text-decoration: none;
  }

  .mobile-tabbar__link:hover {
    text-decoration: none;
    color: var(--ink);
  }

  .mobile-tabbar__link.is-active {
    color: var(--brand);
    background: var(--brand-soft);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* --- Oldal fejléc --------------------------------------------------------- */

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.page-header__text {
  min-width: 0;
}

.page-header__eyebrow {
  margin: 0 0 var(--space-1);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-title {
  font-size: 1.55rem;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.page-subtitle {
  margin: var(--space-1) 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* --- Kártya --------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--line);
}

.card__title {
  font-size: 0.98rem;
}

.card__body {
  padding: var(--space-5);
}

.card--flush .card__body {
  padding: 0;
}

.card__footer {
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* --- KPI ------------------------------------------------------------------ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--periwinkle);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.kpi:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

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

.kpi__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.kpi__value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.kpi__hint {
  font-size: 0.76rem;
  color: var(--muted);
}

.kpi--danger {
  border-top-color: var(--due-overdue);
}

.kpi--danger .kpi__value {
  color: var(--due-overdue);
}

.kpi--warning {
  border-top-color: var(--due-urgent);
}

.kpi--warning .kpi__value {
  color: var(--due-urgent);
}

.kpi--ok {
  border-top-color: var(--due-ok);
}

.kpi--ok .kpi__value {
  color: var(--due-ok);
}

.kpi--info {
  border-top-color: var(--periwinkle);
}

/* --- Gombok --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.86rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.btn:hover {
  text-decoration: none;
  background: var(--surface-3);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
  box-shadow: var(--shadow-brand);
}

.btn--primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

.btn--secondary {
  background: var(--surface);
  border-color: var(--line-strong);
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}

.btn--ghost:hover {
  background: var(--surface-3);
}

.btn--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--on-danger);
}

.btn--danger:hover {
  filter: brightness(0.92);
}

.btn--sm {
  min-height: 32px;
  padding: 0 var(--space-3);
  font-size: 0.8rem;
}

.btn--block {
  width: 100%;
}

.btn--icon {
  width: var(--control-height);
  padding: 0;
}

.btn--icon.btn--sm {
  width: 32px;
}

.btn-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--brand);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-link:hover {
  text-decoration: underline;
}

.inline-form {
  display: inline;
  margin: 0;
}


/* --- Badge / chip --------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  background: var(--surface-3);
  color: var(--ink-2);
}

.badge--overdue {
  background: var(--due-overdue-bg);
  color: var(--due-overdue);
}

.badge--urgent {
  background: var(--due-urgent-bg);
  color: var(--due-urgent);
}

.badge--soon {
  background: var(--due-soon-bg);
  color: var(--due-soon);
}

.badge--ok {
  background: var(--due-ok-bg);
  color: var(--due-ok);
}

.badge--neutral {
  background: var(--surface-3);
  color: var(--muted);
}

.badge--info {
  background: var(--info-soft);
  color: var(--info);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 0.78rem;
}

.chip--removable button {
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
  padding: 0;
  line-height: 1;
}

/* --- Táblázat ------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

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

.table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
}

.table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

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

.table tbody tr:hover {
  background: var(--surface-2);
}

.table--compact td,
.table--compact th {
  padding: var(--space-2) var(--space-3);
}

.plate {
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.plate a {
  color: var(--ink);
}

.plate a:hover {
  color: var(--brand);
}

.row-link {
  cursor: pointer;
}

.row-link:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.table td .actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .table--stack thead {
    display: none;
  }

  .table--stack,
  .table--stack tbody,
  .table--stack tr,
  .table--stack td {
    display: block;
    width: 100%;
  }

  .table--stack tr {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: var(--space-2);
    background: var(--surface);
    padding: var(--space-2) var(--space-3);
  }

  .table--stack td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    border: 0;
    padding: var(--space-1) 0;
    text-align: right;
  }

  .table--stack td::before {
    content: attr(data-label);
    flex: 0 0 44%;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .table--stack td.num {
    text-align: right;
  }
}

/* --- Űrlapok -------------------------------------------------------------- */

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.field__label,
.field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-2);
}

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

.field__error {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--danger);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: var(--control-height);
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--muted);
}

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  border-color: var(--brand);
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.input[aria-invalid="true"],
.select[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

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

.field--check {
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
}

.checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding-top: var(--space-2);
}

.form-errors {
  border: 1px solid var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: 0.85rem;
}

.form-errors ul {
  margin: var(--space-1) 0 0;
  padding-left: var(--space-4);
}

.help-list {
  margin: 0;
  padding-left: var(--space-5);
  color: var(--muted);
  font-size: 0.78rem;
}

.filters {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--line);
}

.filters .field {
  min-width: 160px;
}

.filters .field--grow {
  flex: 1 1 240px;
  min-width: 220px;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-8) var(--space-4);
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
  text-align: center;
  transition: border-color 120ms ease, background 120ms ease;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.dropzone__icon {
  color: var(--brand);
}

.dropzone__title {
  font-weight: 600;
}

.dropzone__hint {
  font-size: 0.78rem;
  color: var(--muted);
}

.dropzone__file {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-2);
}

.resolve-form {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.resolve-form .select,
.resolve-form .input {
  width: auto;
  min-width: 120px;
}


/* --- Üres állapot --------------------------------------------------------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-10) var(--space-5);
  text-align: center;
  color: var(--muted);
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  color: var(--muted);
}

.empty__title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink);
}

.empty__text {
  max-width: 46ch;
  font-size: 0.86rem;
  margin: 0;
}

/* --- Értesítések ---------------------------------------------------------- */

.messages {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.86rem;
}

.alert--success {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--success);
}

.alert--error {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.alert--warning {
  background: var(--warning-soft);
  border-color: var(--warning);
  color: var(--warning);
}

.alert--info {
  background: var(--info-soft);
  border-color: var(--info);
  color: var(--info);
}

.toast-stack {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: min(90vw, 360px);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  font-size: 0.86rem;
}

.toast--success {
  border-left: 4px solid var(--success);
}

.toast--error {
  border-left: 4px solid var(--danger);
}

.toast--info {
  border-left: 4px solid var(--info);
}

.toast__close {
  margin-left: auto;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}

/* --- Egyéb ---------------------------------------------------------------- */

.tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-4);
  overflow-x: auto;
}

.tabs a {
  padding: var(--space-2) var(--space-3);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.86rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tabs a:hover {
  color: var(--ink);
  text-decoration: none;
}

.tabs a.is-active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.segmented {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.segmented a,
.segmented button {
  padding: 4px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.segmented .is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.83rem;
}

.pagination__links {
  display: flex;
  gap: var(--space-2);
}

.stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
}

.stat-row:last-child {
  border-bottom: 0;
}

.stat-row__label {
  color: var(--muted);
  font-size: 0.82rem;
}

.stat-row__value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 var(--space-5);
  border-left: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.timeline li {
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: calc(var(--space-5) * -1 - 6px);
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--periwinkle);
  border: 2px solid var(--surface);
}

.timeline time {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.timeline__title {
  font-weight: 600;
  font-size: 0.88rem;
}

.timeline__meta {
  color: var(--muted);
  font-size: 0.8rem;
}


.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3));
  animation: skeleton-pulse 1.4s ease-in-out infinite;
  min-height: 14px;
}

@keyframes skeleton-pulse {
  50% {
    opacity: 0.55;
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
}

.narrow {
  max-width: 560px;
}

.inline-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: var(--space-3) var(--space-4);
}

.inline-panel > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand);
  font-size: 0.86rem;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.inline-panel[open] {
  padding-bottom: var(--space-4);
}

.inline-panel form {
  margin-top: var(--space-3);
}

.details-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--space-4);
  margin: 0;
}

.details-list dt {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.details-list dd {
  margin: var(--space-1) 0 0;
  font-weight: 500;
}

/* --- Auth / hiboldalak ---------------------------------------------------- */

.auth-wrap {
  width: 100%;
  max-width: 420px;
  margin: clamp(var(--space-6), 8vh, 96px) auto 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.auth-card__head {
  padding: var(--space-6) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  margin-bottom: var(--space-4);
}

.auth-brand:hover {
  text-decoration: none;
}

.auth-card__title {
  font-size: 1.35rem;
}

.auth-card__subtitle {
  margin: var(--space-1) 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.auth-card__body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.auth-divider {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.auth-card__body .form {
  gap: var(--space-3);
}

.auth-card__body .form p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.auth-card__body .form label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-2);
}

.auth-card__body .form input {
  width: 100%;
  min-height: var(--control-height);
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}

.auth-card__body .form .helptext,
.auth-card__body .form .helptext ul {
  font-size: 0.76rem;
  color: var(--muted);
  margin: var(--space-1) 0 0;
  padding-left: var(--space-4);
}

.auth-card__body .form ul.errorlist {
  list-style: none;
  margin: var(--space-1) 0 0;
  padding: 0;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 600;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.auth-footnote {
  text-align: center;
  color: var(--muted);
  font-size: 0.76rem;
  margin: 0;
}

.error-page {
  background: var(--bg);
}


