:root {
  --bg-main: #f5f3ff;
  --bg-dark: #2a1e57;
  --surface: #ffffff;
  --text: #1f1a35;
  --muted: #6b5f8f;
  --primary: #f8418c;
  --primary-hover: #df2a74;
  --line: #e5dcff;
  --ok: #1b8f5e;
  --warn: #9a6a0f;
  --todo: #8b3a5e;
}


* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #efeaff 0%, var(--bg-main) 55%, #ffffff 100%);
}


.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.topbar {
  background: var(--bg-dark);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.topbar-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav a,
.topbar-actions a,
.panel-head a,
.footer a {
  text-decoration: none;
}

.nav a {
  color: #e8defb;
  font-size: 0.95rem;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.nav-group {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: -10px;
}

.nav-trigger {
  color: #e8defb;
  font-size: 0.95rem;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  display: inline-block;
}

.nav-group:hover .nav-trigger,
.nav-group:focus-within .nav-trigger {
  color: #ffffff;
  border-bottom-color: #f8418c;
}

body.section-content .nav-group:nth-child(2) .nav-trigger,
body.section-mukodes .nav-group:nth-child(3) .nav-trigger,
body.section-kontroll .nav-group:nth-child(4) .nav-trigger,
body.section-admin .nav-group:nth-child(5) .nav-trigger {
  color: #ffffff;
  border-bottom-color: #f8418c;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(45, 24, 93, 0.12);
  padding: 8px;
  display: none;
  z-index: 20;
}

.nav-group:hover .dropdown,
.nav-group:focus-within .dropdown {
  display: block;
}

.dropdown a {
  display: block;
  color: #3e3562;
  border-bottom: 0;
  padding: 8px 10px;
  border-radius: 8px;
}

.dropdown a:hover {
  background: #f5f1ff;
  color: #1f1a35;
}

.nav a:hover,
.nav a.active {
  color: #ffffff;
  border-bottom-color: #f8418c;
}

.nav .dropdown a,
.nav .dropdown a:hover,
.nav .dropdown a:focus,
.nav .dropdown a:active {
  color: #1f1a35;
  border-bottom-color: transparent;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.page {
  padding: 24px 0 36px;
}

.page > section + section {
  margin-top: 12px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(45, 24, 93, 0.07);
}

.hero {
  margin-bottom: 0;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}

.hero-text {
  margin: 0 0 16px;
  color: #4d456f;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 0;
}

.kpi h2 {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.kpi .value {
  margin: 10px 0 4px;
  font-size: 1.6rem;
  font-weight: 800;
}

.kpi .meta {
  margin: 0;
  font-size: 0.85rem;
  color: #6e6497;
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}

.quick-nav {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-link {
  text-decoration: none;
  color: inherit;
}

.quick-link h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.quick-link p {
  margin: 0;
  font-size: 0.9rem;
  color: #5b537e;
}

.panel h2 {
  margin: 0;
  font-size: 1.05rem;
}

.panel p {
  margin: 8px 0 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.panel-head a {
  color: #5f4fa5;
  font-size: 0.88rem;
}

.topic-list,
.status-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.topic-list li {
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.topic-list li:last-child {
  border-bottom: 0;
}

.topic-list h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.topic-list p {
  margin: 0;
  color: #5b537e;
  font-size: 0.9rem;
}

.status-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.status-list li:last-child {
  border-bottom: 0;
}

.status-list span {
  color: #4f4775;
}

.status-list strong {
  font-size: 0.85rem;
}

.ok { color: var(--ok); }
.warn { color: var(--warn); }
.todo { color: var(--todo); }
.muted { color: var(--muted); }

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--line);
  background: #f5f3ff;
  color: #4a3f74;
}

.badge-ok {
  background: #e9f8f1;
  color: #166534;
  border-color: #b5e6cd;
}

.badge-warn {
  background: #fff7e6;
  color: #92400e;
  border-color: #f7d7a2;
}

.badge-todo {
  background: #fdeef4;
  color: #9f1239;
  border-color: #f8bfd2;
}

.badge-score-high {
  background: #e7f9ef;
  color: #166534;
  border-color: #b7e8cc;
}

.badge-score-mid {
  background: #fff7e8;
  color: #92400e;
  border-color: #f7ddb0;
}

.badge-score-low {
  background: #fff0f3;
  color: #9f1239;
  border-color: #ffc4d0;
}

.table-wrap {
  overflow-x: auto;
}

.simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.simple-table th,
.simple-table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.simple-table th {
  color: var(--muted);
  font-weight: 700;
}

.stack-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stack-item h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.stack-item p {
  margin: 0;
  color: #5b537e;
  font-size: 0.9rem;
}

.split-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--line);
  padding: 10px 0;
}

.check-list li:last-child {
  border-bottom: 0;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  border-left: 3px solid #d7ccff;
  padding: 0 0 14px 12px;
  margin-left: 4px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.timeline p {
  margin: 0;
  color: #5b537e;
  font-size: 0.9rem;
}

.subnav {
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.subnav a {
  color: #5b4ea0;
  text-decoration: none;
}

.code-box {
  margin-top: 10px;
  background: #f7f5ff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.82rem;
  overflow-x: auto;
}

.report-print {
  margin-top: 14px;
}

.full {
  width: 100%;
  text-align: center;
  margin-top: 12px;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

.pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: #4f4775;
  font-size: 0.82rem;
  font-weight: 700;
}

.pill.active {
  background: #fce8f1;
  border-color: #f7b8d1;
  color: #8c1041;
}


.note-box {
  margin-top: 12px;
  border-left: 4px solid #f8418c;
  background: #fff7fb;
  padding: 10px 12px;
  border-radius: 8px;
  color: #5a3750;
  font-size: 0.9rem;
}

.login-page {
  min-height: 100vh;
  background:
    linear-gradient(165deg, rgba(34, 26, 84, 0.18), rgba(34, 26, 84, 0.08)),
    linear-gradient(160deg, #f8418c 0%, #8a4dd1 52%, #315fcb 100%);
}

.login-shell {
  max-width: 440px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
}

.login-card {
  width: 100%;
  padding: 30px 28px 24px;
  border-radius: 10px;
  border: 1px solid #ece7ff;
  box-shadow: 0 18px 38px rgba(20, 16, 52, 0.25);
  background: #fff;
}

.login-card h1 {
  margin: 0 0 10px;
  font-size: 2.1rem;
}

.login-title {
  text-align: center;
}

.login-text {
  text-align: center;
  font-size: 0.96rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.login-form {
  grid-template-columns: 1fr;
  gap: 12px;
}

.login-form .field label {
  font-size: 0.85rem;
}

.login-form .input {
  height: 44px;
  border-radius: 4px;
  border-color: #e4def5;
  background: #faf9ff;
}

.login-form .input:focus {
  border-color: #8f4fd1;
  outline: 2px solid rgba(143, 79, 209, 0.16);
  outline-offset: 0;
}

.login-submit {
  margin-top: 10px;
  height: 44px;
  border-radius: 4px;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
}

.login-error {
  min-height: 20px;
  margin: 4px 0 0;
  color: #a33131;
  font-size: 0.82rem;
  text-align: center;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.88rem;
  color: #55497f;
  font-weight: 700;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.textarea {
  min-height: 90px;
  resize: vertical;
}

.field-full {
  grid-column: 1 / -1;
}

.alert {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.alert-info {
  background: #f3f0ff;
  border-color: #d9ceff;
  color: #4f3f86;
}

.alert-error {
  background: #fff0f3;
  border-color: #ffc6d1;
  color: #9f1239;
}

.state-box {
  border: 1px dashed #d9ceff;
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  color: #5a4f84;
  background: #fbf9ff;
}

.state-box h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.state-box p {
  margin: 0;
  font-size: 0.9rem;
}


.footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #5d527f;
  font-size: 0.9rem;
  text-align: center;
}

.footer-inner span::after {
  content: " (frontend drótváz)";
}

.footer nav {
  display: none;
}

.footer a {
  color: #5d527f;
}

@media (max-width: 980px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .quick-nav {
    grid-template-columns: 1fr;
  }

  .stack-list {
    grid-template-columns: 1fr;
  }

  .split-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .topbar-inner {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .nav {
    width: 100%;
    display: none;
    gap: 10px 14px;
    flex-wrap: wrap;
    order: 3;
    padding-top: 8px;
  }

  body.nav-open .nav {
    display: flex;
  }

  .menu-toggle {
    display: inline-block;
  }

  .dropdown {
    position: static;
    display: none;
    min-width: 100%;
    margin-top: 6px;
  }

  .nav-group:hover .dropdown,
  .nav-group:focus-within .dropdown,
  .nav-group.open .dropdown {
    display: block;
  }
}

@media (max-width: 600px) {
  .topbar-actions {
    width: 100%;
  }

  .topbar-actions .btn {
    flex: 1;
    text-align: center;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    padding: 10px 0;
  }
}

@media print {
  body {
    background: #fff;
    color: #111;
  }

  .topbar,
  .footer,
  .topbar-actions,
  .subnav {
    display: none !important;
  }

  .container {
    width: 100%;
    margin: 0;
  }

  .page {
    padding: 0;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
    margin-bottom: 10px;
  }

  .btn {
    display: none !important;
  }
}
