/* UMS by devoppy – a devoppy.com arculatára építve (Geist, Georgia dőlt kiemelés, lime/zöld, eltolt árnyékú modulok). */
:root {
  --bg: #f5f7f0;
  --paper: #fbfcf8;
  --field: #ffffff;
  --ink: #20271f;
  --primary: #263920;
  --on-primary: #bcfa69;
  --muted: #697160;
  --line: #cdd4c5;
  --line-strong: #b4baad;
  --hover: #edf1e5;
  --green: #689d38;
  --lime: #bcfa69;
  --shadow: #b4d98e;
  --module-border: #668b3c;
  --down: #c8432b;
  --warn: #c98a12;
  --idle: #b4baad;

  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: Georgia, "Times New Roman", serif;
  --max: 1440px;
  --gutter: clamp(16px, 3vw, 40px);

  color-scheme: light;
}


* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.label {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  color: var(--muted);
}
.with-dot::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--green);
  vertical-align: 2px;
}

.period { color: var(--green); font-family: var(--serif); font-style: italic; font-weight: 400; }

/* Fejléc */
.top { border-bottom: 1px solid var(--line); }
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 72px;
}
.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
}
.brand .by {
  margin-left: 0.6rem;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.brand .by b { font-weight: 800; letter-spacing: -0.05em; color: var(--ink); }
.nav { display: flex; align-items: center; gap: 0.25rem; }

.meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 22px;
}

/* Nagy címsor */
.display {
  margin: 0;
  font-size: clamp(2.75rem, 7.2vw, 6.5rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.075em;
}
.display em {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.055em;
}

/* Áttekintés */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: end;
  gap: 3rem;
  padding: 3.5rem 0 3.25rem;
}
.hero[data-state="down"] .display em,
.hero[data-state="down"] .display .period { color: var(--down); }

.facts {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding-left: 1.75rem;
  border-left: 1px solid var(--line);
}
.facts div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.facts dd {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.facts .is-down { color: var(--down); }
.facts .note { margin: 0.25rem 0 0; color: var(--warn); font-size: 0.875rem; line-height: 1.4; }

/* Monitor lista */
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 2px solid var(--ink);
}

.row-grid {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr) 150px 100px 112px;
  grid-template-areas: "who strip up ms edit";
  align-items: center;
  gap: 0 2rem;
  padding-inline: 0.75rem;
}
.table-head { padding-block: 0.75rem; border-top: 1px solid var(--line); }
.num { text-align: right; }

.list { list-style: none; margin: 0 0 5rem; padding: 0; border-bottom: 1px solid var(--line); }
.list:empty { display: none; }

.row { padding-block: 1.125rem; border-top: 1px solid var(--line); }
.row:hover { background: var(--hover); }

.who { grid-area: who; display: flex; gap: 0.875rem; min-width: 0; }
.who-text { min-width: 0; }
.who h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.who a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
}
.who a:hover { color: var(--ink); text-decoration: underline; }
.detail { margin: 0.375rem 0 0; font-size: 0.8125rem; line-height: 1.4; color: var(--down); }
[data-state="warn"] .detail { color: var(--warn); }
[data-state="paused"] .detail,
[data-state="pending"] .detail { color: var(--muted); }

.dot {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 0.45em;
  border-radius: 50%;
  background: var(--idle);
}
[data-state="up"] .dot { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 45%, transparent); }
[data-state="warn"] .dot { background: var(--warn); }
[data-state="down"] .dot { background: var(--down); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--down) 55%, transparent); }
  100% { box-shadow: 0 0 0 9px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  [data-state="down"] .dot { animation: none; }
}

/* Jelsáv: magasság = válaszidő, hiba = teljes magasságú piros. */
.strip {
  grid-area: strip;
  display: grid;
  grid-template-columns: repeat(90, minmax(0, 1fr));
  align-items: end;
  gap: 2px;
  height: 36px;
}
.strip i { height: 2px; background: var(--line); }
.strip i.ok { background: var(--green); }
.strip i.fail { height: 100%; background: var(--down); }
[data-state="paused"] .strip { opacity: 0.4; }

.stat {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.stat .label { display: none; }
.stat-up { grid-area: up; }
.stat-ms { grid-area: ms; }
.edit { grid-area: edit; justify-self: end; }

.empty { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 5rem; }
.empty p { margin: 0; max-width: 40rem; }

/* Modul (a devoppy.com dobozai) */
.module {
  padding: 1.75rem;
  background: var(--paper);
  border: 1px solid var(--module-border);
  box-shadow: 6px 6px 0 var(--shadow);
}

/* Gombok */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6875rem 1rem;
  font: 500 0.875rem/1 var(--sans);
  color: var(--ink);
  background: none;
  border: 1px solid transparent;
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--primary); color: var(--on-primary); }
.btn-chip { padding: 0.5rem 0.75rem; font-size: 0.8125rem; font-weight: 400; border-color: var(--line-strong); }
.btn-chip:hover { border-color: var(--ink); background: var(--paper); }
.btn-link { padding-inline: 0.625rem; }
.btn-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn.danger { color: var(--down); padding-left: 0; }
.btn.wide { width: 100%; padding-block: 0.875rem; }
.btn:disabled { opacity: 0.5; cursor: progress; }

/* Űrlapok */
label {
  display: grid;
  gap: 0.375rem;
  margin-bottom: 1.125rem;
  font-size: 0.875rem;
  font-weight: 500;
}
label small { color: var(--muted); font-size: 0.8125rem; font-weight: 400; }
input, textarea {
  width: 100%;
  padding: 0.6875rem 0.8125rem;
  font: 400 0.9375rem/1.4 var(--sans);
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}
textarea { min-height: 5.5rem; resize: vertical; }
label.check { display: flex; align-items: center; gap: 0.625rem; font-size: 0.9375rem; font-weight: 400; }
label.check input { width: 1rem; height: 1rem; accent-color: var(--green); }

:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--ink); }

.error { margin: 0 0 0.75rem; color: var(--down); font-size: 0.875rem; }
.error:empty { display: none; }

/* Belépés */
.login { min-height: 100svh; display: flex; flex-direction: column; }
.login-body {
  flex: 1;
  width: 100%;
  display: grid;
  place-items: center;
  padding-block: 4rem 8rem;
}
.login-form { width: min(26rem, 100%); }
.login-form .label { margin-bottom: 0.5rem; }
.login-title { margin: 0 0 1.75rem; font-size: 2.5rem; font-weight: 500; line-height: 1; letter-spacing: -0.06em; }

/* Szerkesztő ablak */
dialog {
  width: min(34rem, calc(100vw - 2rem));
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--module-border);
  border-radius: 0;
  box-shadow: 6px 6px 0 var(--shadow);
}
dialog::backdrop { background: rgb(20 25 19 / 0.5); }
dialog form { padding: 1.75rem; }
dialog h2 { margin: 0.375rem 0 1.5rem; font-size: 1.75rem; font-weight: 500; letter-spacing: -0.045em; }
.actions { display: flex; align-items: center; gap: 0.25rem; margin-top: 0.5rem; }
.actions .spacer { flex: 1; }

/* Keskenyebb kijelzők */
@media (max-width: 1100px) {
  .row-grid { grid-template-columns: minmax(200px, 280px) minmax(0, 1fr) 120px 90px 104px; gap: 0 1.25rem; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; padding-block: 2.5rem; }
  .facts { padding: 1.25rem 0 0; border-left: 0; border-top: 1px solid var(--line); }

  .table-head { display: none; }
  .row-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "who edit"
      "strip strip"
      "up ms";
    gap: 0.875rem 1rem;
    padding-inline: 0;
  }
  .row:hover { background: none; }
  .row .strip { grid-template-columns: repeat(40, minmax(0, 1fr)); gap: 1.5px; height: 30px; }
  .row .strip i:nth-child(-n + 50) { display: none; }
  .stat { text-align: left; }
  .stat .label { display: block; margin-bottom: 0.125rem; }
  .stat-ms { justify-self: end; text-align: right; }
  .empty { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .hide-sm { display: none; }
  .brand { font-size: 26px; }
  .nav .btn-primary { padding-inline: 0.875rem; }
}

/* ---------- Főoldal ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.nav-link {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--ink);
  text-decoration: none;
}
.nav-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.nav .btn-chip { margin-left: 0.5rem; }
.btn-lg { padding: 1rem 1.375rem; font-size: 1rem; }
.brand.small { font-size: 22px; }

.l-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5rem);
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem);
}
.display.xl { font-size: clamp(3.5rem, 10vw, 9rem); }
.lede {
  max-width: 34rem;
  margin: 2.25rem 0 0;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.5;
  color: var(--muted);
}
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 0.5rem; margin-top: 2.25rem; }
.hero-price { margin: 1.25rem 0 0; color: var(--muted); font-size: 0.9375rem; }
.hero-price strong { color: var(--ink); font-weight: 600; }

/* Élő szimuláció */
.demo { margin: 0; padding: 1.5rem; }
.demo-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.875rem; }
.demo-head .dot { margin-top: 0; }
.demo-name { display: block; font-size: 1.125rem; font-weight: 500; letter-spacing: -0.015em; line-height: 1.25; }
.demo-ms { font-weight: 500; font-variant-numeric: tabular-nums; }
.demo .strip { grid-template-columns: repeat(40, minmax(0, 1fr)); height: 76px; margin-top: 1.5rem; }
.demo-foot { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.75rem; }
.demo-caption { margin-top: 1.125rem; text-align: right; }

.mail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.875rem;
  min-height: 6.25rem;
  margin-top: 1.375rem;
  padding: 1rem 1.125rem;
  background: var(--field);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
}
.mail[data-kind="down"] { border-left-color: var(--down); }
.mail[data-kind="up"] { border-left-color: var(--green); }
.mail svg { width: 20px; height: 20px; margin-top: 1px; color: var(--muted); }
.mail strong { display: block; margin: 0.125rem 0; font-weight: 500; }
.mail[data-kind="down"] strong { color: var(--down); }
.mail-body { font-size: 0.875rem; color: var(--muted); }
.mail.in { animation: mail-in 0.4s ease-out; }
@keyframes mail-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .mail.in { animation: none; } }

/* Szekciók */
.l-section { padding-bottom: clamp(4rem, 8vw, 7rem); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.steps li { padding: 2rem 2rem 0 0; }
.steps li + li { padding-left: 2rem; border-left: 1px solid var(--line); }
.steps h2 {
  margin: 1.5rem 0 0.875rem;
  font-size: clamp(1.625rem, 2.6vw, 2.375rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.05em;
}
.steps p { max-width: 26rem; margin: 0; color: var(--muted); }
.steps code { font-family: var(--mono); font-size: 0.9em; color: var(--ink); }

.price-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5rem);
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.price {
  margin: 0;
  font-size: clamp(6rem, 19vw, 15rem);
  font-weight: 500;
  line-height: 0.85;
  letter-spacing: -0.08em;
}
.price em {
  margin-left: 0.12em;
  font-family: var(--serif);
  font-size: 0.42em;
  font-weight: 400;
  letter-spacing: -0.03em;
}
.price-sub { margin: 1.75rem 0 0.625rem; font-size: 1.375rem; font-weight: 500; letter-spacing: -0.025em; }
.price-note { max-width: 30rem; margin: 0; color: var(--muted); }
.price-box .label { margin-bottom: 1.25rem; }
.includes { display: grid; gap: 0.75rem; margin: 0 0 1.75rem; padding: 0; list-style: none; }
.includes li { display: flex; gap: 0.75rem; }
.includes li::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 5px;
  background: var(--lime);
  border: 1px solid var(--module-border);
}

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.375rem 0;
  font-size: clamp(1.125rem, 1.7vw, 1.4375rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-weight: 400; color: var(--green); }
.faq details[open] summary::after { content: "–"; }
.faq summary:hover { color: var(--primary); }
.faq p { max-width: 48rem; margin: 0 0 1.625rem; color: var(--muted); }
.faq a { color: var(--ink); }

.l-final { padding-block: clamp(4rem, 8vw, 7rem); border-top: 2px solid var(--ink); }
.l-final .display { font-size: clamp(2.75rem, 7.5vw, 7rem); }

.l-footer { border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1.75rem;
}
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-inner a { font-size: 0.875rem; color: var(--ink); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 960px) {
  .hide-md { display: none; }
  .l-hero, .price-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 1.75rem 0; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line); }
}

/* ---------- Szerepkörök és ügyfél-belépés ---------- */
[data-role="customer"] .admin-only,
body:not([data-role="customer"]) .customer-only { display: none !important; }

.owner { display: block; margin-top: 0.125rem; font-family: var(--mono); font-size: 12px; color: var(--green); }

.login-note { margin: 0 0 1rem; color: var(--muted); font-size: 0.9375rem; }
.code-input { font-family: var(--mono); font-size: 1.5rem; letter-spacing: 0.4em; }
.login-alt { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.25rem; margin-top: 1.125rem; }
.login-alt span { display: contents; }
.link-btn {
  padding: 0.25rem 0;
  font: inherit;
  font-size: 0.875rem;
  color: var(--muted);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: var(--ink); }
