:root {
  --offix-blue: #3f7fc4;
  --offix-blue-dark: #2d67a6;
  --offix-blue-soft: #eef5fb;
  --offix-sky: #66b8e8;

  --text: #1f2937;
  --text-soft: #667085;

  --border: #dfe6ee;

  --background: #f7f9fc;
  --white: #ffffff;

  --success-bg: #eaf7ef;
  --success-text: #216a3d;

  --error-bg: #fdecec;
  --error-text: #a12b2b;

  --shadow:
    0 10px 28px rgba(31, 41, 55, 0.07);

  --radius: 16px;
}


/* =========================================================
   ALAP
========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;

  background: var(--background);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: inherit;
}

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}


/* =========================================================
   HEADER
========================================================= */

.topbar {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border);

  position: sticky;
  top: 0;
  z-index: 100;

  backdrop-filter: blur(8px);
}

.nav {
  min-height: 102px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 34px;
}


/* =========================================================
   BRAND
========================================================= */

.brand {
  display: flex;
  align-items: center;

  gap: 16px;

  text-decoration: none;
  min-width: 0;

  flex-shrink: 0;
}

.brand-logo {
  display: block;

  width: auto;
  height: 80px;
  max-width: 165px;

  object-fit: contain;
}

.brand-name {
  display: flex;
  flex-direction: column;

  line-height: 1.1;
}

.brand-title {
  font-size: 22px;
  font-weight: 800;

  color: var(--offix-blue-dark);

  letter-spacing: -0.02em;
}

.brand-subtitle {
  margin-top: 5px;

  font-size: 13px;

  color: var(--text-soft);
}


/* =========================================================
   JOBB OLDALI FEJLÉC
========================================================= */

.nav-right {
  display: flex;
  flex-direction: column;

  align-items: flex-end;
  justify-content: center;

  gap: 8px;

  min-width: 0;
}


/* =========================================================
   NAVIGÁCIÓ
========================================================= */

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 8px;

  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;

  font-size: 15px;
  font-weight: 650;

  color: #344054;

  padding: 11px 14px;

  border-radius: 10px;

  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.main-nav a:hover {
  background: var(--offix-blue-soft);
  color: var(--offix-blue-dark);
}

.main-nav .primary-link {
  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      var(--offix-blue-dark),
      var(--offix-sky)
    );

  padding: 13px 18px;

  box-shadow:
    0 8px 20px rgba(63, 127, 196, 0.22);
}

.main-nav .primary-link:hover {
  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      #245d99,
      #56aee0
    );

  transform: translateY(-1px);
}


/* =========================================================
   BELÉPETT FELHASZNÁLÓ
========================================================= */

.user-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 7px;

  min-height: 20px;

  font-size: 13px;

  white-space: nowrap;
}

.user-indicator {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: #35a76f;

  box-shadow:
    0 0 0 3px rgba(53, 167, 111, 0.12);

  flex-shrink: 0;
}

.user-name {
  color: #344054;

  font-weight: 700;
}

.user-divider {
  color: #a8b3c1;
}

.logout-link {
  color: var(--offix-blue-dark);

  font-weight: 700;

  text-decoration: none;

  transition:
    color 0.18s ease;
}

.logout-link:hover {
  color: #1f568f;

  text-decoration: underline;
}


/* =========================================================
   OLDALSTRUKTÚRA
========================================================= */

.main-content {
  min-height: calc(100vh - 180px);

  padding-top: 42px;
  padding-bottom: 70px;
}

.hero,
.page-head {
  margin-bottom: 26px;
}

.hero {
  display: flex;

  align-items: flex-end;
  justify-content: space-between;

  gap: 24px;
}

.page-head {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 8px;

  font-size: 12px;
  font-weight: 800;

  letter-spacing: 0.12em;

  text-transform: uppercase;

  color: var(--offix-blue-dark);
}


/* =========================================================
   TIPOGRÁFIA
========================================================= */

h1,
h2,
h3 {
  color: #162033;
}

h1 {
  margin: 0 0 8px;

  font-size: clamp(30px, 3vw, 42px);

  line-height: 1.13;

  letter-spacing: -0.035em;
}

h2 {
  margin: 0 0 22px;

  font-size: 21px;

  line-height: 1.3;
}

h3 {
  margin-top: 0;
}

p {
  margin-top: 0;
}

.muted,
.hint {
  color: var(--text-soft);
}

.hint a {
  color: var(--offix-blue-dark);
  font-weight: 700;
}


/* =========================================================
   KÁRTYÁK
========================================================= */

.card {
  background: var(--white);

  border: 1px solid var(--border);

  border-radius: var(--radius);

  box-shadow: var(--shadow);

  margin-bottom: 20px;

  overflow: hidden;
}

.form-card {
  padding: 28px;
}

.empty {
  padding: 58px 32px;

  text-align: center;
}

.empty h3 {
  margin-bottom: 8px;
}

.empty p {
  margin-bottom: 0;

  color: var(--text-soft);
}


/* =========================================================
   ŰRLAPOK
========================================================= */

.grid {
  display: grid;

  gap: 20px;
}

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

label {
  display: flex;
  flex-direction: column;

  gap: 7px;

  font-size: 13px;
  font-weight: 700;

  color: #344054;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;

  padding: 11px 13px;

  border: 1px solid #cfd8e3;

  border-radius: 10px;

  background: #ffffff;

  color: var(--text);

  font: inherit;

  font-weight: 400;

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

textarea {
  min-height: 110px;

  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #afbecd;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;

  border-color: var(--offix-blue);

  box-shadow:
    0 0 0 4px rgba(63, 127, 196, 0.13);
}

input::placeholder,
textarea::placeholder {
  color: #98a2b3;
}


/* =========================================================
   GOMBOK
========================================================= */

button,
.button {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-height: 44px;

  border: 0;

  border-radius: 10px;

  padding: 11px 18px;

  background:
    linear-gradient(
      135deg,
      var(--offix-blue-dark),
      var(--offix-sky)
    );

  color: #ffffff;

  font: inherit;

  font-size: 14px;
  font-weight: 750;

  text-decoration: none;

  cursor: pointer;

  box-shadow:
    0 6px 16px rgba(63, 127, 196, 0.2);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

button:hover,
.button:hover {
  transform: translateY(-1px);

  box-shadow:
    0 8px 20px rgba(63, 127, 196, 0.27);
}

button:active,
.button:active {
  transform: translateY(0);
}

.actions {
  margin-top: 24px;

  display: flex;

  justify-content: flex-end;

  gap: 10px;
}

.actions.bottom {
  margin-top: 10px;
}


/* =========================================================
   TÁBLÁZATOK
========================================================= */

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

table {
  width: 100%;

  border-collapse: collapse;
}

th,
td {
  padding: 16px 18px;

  text-align: left;

  border-bottom: 1px solid #e8edf3;

  white-space: nowrap;
}

th {
  background: #fbfcfe;

  color: #667085;

  font-size: 11px;
  font-weight: 800;

  letter-spacing: 0.06em;

  text-transform: uppercase;
}

td {
  font-size: 14px;
}

tbody tr {
  transition:
    background-color 0.15s ease;
}

tbody tr:hover {
  background: #f8fbfe;
}

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

.status {
  display: inline-flex;

  align-items: center;

  padding: 5px 9px;

  border-radius: 999px;

  background: var(--offix-blue-soft);

  color: var(--offix-blue-dark);

  font-size: 12px;
  font-weight: 700;
}


/* =========================================================
   FLASH ÜZENETEK
========================================================= */

.flash-container {
  margin-bottom: 20px;
}

.flash {
  padding: 13px 15px;

  border-radius: 10px;

  border: 1px solid transparent;

  font-size: 14px;
  font-weight: 600;
}

.flash + .flash {
  margin-top: 8px;
}

.flash.success {
  background: var(--success-bg);

  color: var(--success-text);

  border-color: #ccebd7;
}

.flash.error {
  background: var(--error-bg);

  color: var(--error-text);

  border-color: #f6caca;
}


/* =========================================================
   FOOTER
========================================================= */

.portal-footer {
  background: #ffffff;

  border-top: 1px solid var(--border);

  color: var(--text-soft);

  font-size: 12px;
}

.footer-inner {
  min-height: 62px;

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 20px;
}

.footer-product {
  color: var(--offix-blue-dark);

  font-weight: 700;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 980px) {

  .nav {
    gap: 20px;
  }

  .brand-logo {
    height: 68px;
    max-width: 140px;
  }

  .brand-title {
    font-size: 20px;
  }

  .main-nav a {
    font-size: 14px;

    padding: 10px 11px;
  }

  .main-nav .primary-link {
    padding: 11px 14px;
  }
}


/* =========================================================
   MOBIL
========================================================= */

@media (max-width: 820px) {

  .wrap {
    width: min(100% - 28px, 1180px);
  }

  .nav {
    min-height: auto;

    padding: 12px 0;

    align-items: flex-start;

    flex-direction: column;
  }

  .brand-logo {
    height: 64px;

    max-width: 130px;
  }

  .nav-right {
    width: 100%;

    align-items: flex-start;

    gap: 12px;
  }

  .main-nav {
    width: 100%;

    justify-content: flex-start;

    overflow-x: auto;

    flex-wrap: nowrap;

    padding-bottom: 2px;
  }

  .main-nav a {
    white-space: nowrap;
  }

  .user-menu {
    width: 100%;

    justify-content: flex-start;
  }

  .hero {
    align-items: flex-start;

    flex-direction: column;
  }

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

  .form-card {
    padding: 22px;
  }

  .main-content {
    padding-top: 28px;
  }

  .footer-inner {
    padding: 18px 0;

    align-items: flex-start;

    flex-direction: column;

    gap: 4px;
  }
}


/* =========================================================
   KIS MOBIL
========================================================= */

@media (max-width: 520px) {

  .wrap {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    gap: 12px;
  }

  .brand-title {
    font-size: 18px;
  }

  .brand-subtitle {
    font-size: 12px;
  }

  .brand-logo {
    height: 56px;

    max-width: 110px;
  }

  h1 {
    font-size: 30px;
  }

  .card {
    border-radius: 13px;
  }

  .form-card {
    padding: 18px;
  }

  .actions {
    align-items: stretch;

    flex-direction: column;
  }

  button,
  .button {
    width: 100%;
  }

  th,
  td {
    padding: 14px;
  }

  .user-menu {
    flex-wrap: wrap;
  }
}