/* Szinkron admin – irodai munkalap */
@font-face { font-family: "Atkinson"; font-weight: 400; font-display: swap;
  src: url(fonts/atkinson-hyperlegible-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson"; font-weight: 400; font-display: swap;
  src: url(fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson"; font-weight: 700; font-display: swap;
  src: url(fonts/atkinson-hyperlegible-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson"; font-weight: 700; font-display: swap;
  src: url(fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #F4F6F9;
  --sheet: #FFFFFF;
  --ink: #1E2B4A;
  --graphite: #5B6475;
  --rule: #D9DFE8;
  --royal: #2B4FC4;
  --royal-dark: #1F3C9C;
  --marker: #F5E04A;
  --ok: #2E7D52;
  --stop: #B8402E;
  --ok-bg: #E7F3EC;
  --stop-bg: #F8E7E3;
  --fs-s: 0.875rem; --fs-m: 1rem; --fs-l: 1.25rem; --fs-xl: 1.625rem; --fs-xxl: 2.125rem;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Atkinson", "Segoe UI", system-ui, sans-serif; font-size: var(--fs-m); line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
a { color: var(--royal); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h2 { font-size: var(--fs-l); }
h3 { font-size: var(--fs-m); }
p { margin: 0 0 0.75rem; max-width: 70ch; }
.muted { color: var(--graphite); }
.small { font-size: var(--fs-s); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--royal); outline-offset: 2px; }

/* A kiemelő-csík: oldalcím és aktív menüpont */
.marker {
  background: linear-gradient(transparent 52%, var(--marker) 52%, var(--marker) 90%, transparent 90%);
  padding: 0 0.15em;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

/* ---------- elrendezés ---------- */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side {
  background: var(--sheet); border-right: 1px solid var(--rule);
  padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 1.5rem;
}
.brand { font-size: var(--fs-l); font-weight: 700; padding: 0 0.5rem; }
.brand small { display: block; font-size: var(--fs-s); font-weight: 400; color: var(--graphite); }
.nav { display: flex; flex-direction: column; gap: 0.15rem; }
.nav-title { font-size: var(--fs-s); color: var(--graphite); padding: 0.75rem 0.5rem 0.25rem; }
.nav a {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.5rem; border-radius: 6px; color: var(--ink); text-decoration: none;
}
.nav a:hover { background: var(--paper); }
.nav a.active span:first-child {
  background: linear-gradient(transparent 52%, var(--marker) 52%, var(--marker) 90%, transparent 90%);
  font-weight: 700;
}
.side-foot { margin-top: auto; font-size: var(--fs-s); color: var(--graphite); padding: 0 0.5rem; }
.side-foot button { margin-top: 0.5rem; }

.main { padding: 2rem 2.5rem 4rem; max-width: 1180px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { font-size: var(--fs-xxl); }
.page-head .sub { color: var(--graphite); margin-top: 0.35rem; }

/* ---------- lapok (szakaszok) ---------- */
.sheet {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px;
  padding: 1.5rem 1.75rem; margin-bottom: 1.25rem;
}
.sheet > h2 { margin-bottom: 0.25rem; }
.sheet > .lead { color: var(--graphite); margin-bottom: 1rem; }

/* vonalazott adatsorok, mint egy füzetlap */
.ledger { display: grid; grid-template-columns: minmax(180px, max-content) 1fr; margin: 0; }
.ledger dt, .ledger dd { margin: 0; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.ledger dt { color: var(--graphite); padding-right: 2rem; }
.ledger dd { font-weight: 700; }

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.figure { padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--rule); }
.figure b { display: block; font-size: var(--fs-xl); }
.figure span { color: var(--graphite); font-size: var(--fs-s); }

/* állapot jelzők */
.state { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--fs-s); font-weight: 700;
  padding: 0.15rem 0.6rem; border-radius: 999px; border: 1.5px solid currentColor; }
.state.ok { color: var(--ok); background: var(--ok-bg); }
.state.stop { color: var(--stop); background: var(--stop-bg); }
.state.run { color: var(--ink); background: var(--marker); border-color: var(--ink); }
.state.idle { color: var(--graphite); }

/* ügyféllista */
.client-list { border-top: 2px solid var(--ink); }
.client-row {
  display: grid; grid-template-columns: 1.6fr repeat(3, 1fr) 190px; gap: 1rem; align-items: center;
  padding: 1rem 0.25rem; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none;
}
.client-row:hover { background: var(--sheet); }
.client-row .name { font-weight: 700; font-size: var(--fs-l); }
.client-row .num { font-weight: 700; }
.client-row .lbl { display: block; font-size: var(--fs-s); color: var(--graphite); font-weight: 400; }
.list-head { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr) 190px; gap: 1rem; padding: 0.5rem 0.25rem; font-size: var(--fs-s); color: var(--graphite); }

/* fülek */
.tabs { display: flex; gap: 0.25rem; border-bottom: 2px solid var(--ink); margin-bottom: 1.5rem; flex-wrap: wrap; }
.tabs a {
  padding: 0.55rem 1rem; color: var(--graphite); text-decoration: none; border-radius: 6px 6px 0 0;
  border: 1px solid transparent; border-bottom: none; margin-bottom: -2px;
}
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); font-weight: 700; background: var(--sheet); border-color: var(--rule); border-bottom: 2px solid var(--sheet); }

/* űrlapok */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem 1.5rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field label { font-weight: 700; font-size: var(--fs-s); }
.field .help { font-size: var(--fs-s); color: var(--graphite); }
input[type=text], input[type=email], input[type=password], input[type=number], select {
  font: inherit; color: var(--ink); background: var(--sheet);
  border: 1.5px solid var(--rule); border-radius: 6px; padding: 0.55rem 0.7rem; width: 100%;
}
input:focus, select:focus { border-color: var(--royal); outline: none; box-shadow: 0 0 0 3px rgba(43, 79, 196, 0.18); }
input:disabled, select:disabled { background: var(--paper); color: var(--graphite); }
.check { flex-direction: row; align-items: center; gap: 0.6rem; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--royal); }

button, .btn {
  font: inherit; font-weight: 700; cursor: pointer; border-radius: 6px; padding: 0.55rem 1.1rem;
  border: 1.5px solid var(--royal); background: var(--royal); color: #fff; text-decoration: none; display: inline-block;
}
button:hover { background: var(--royal-dark); border-color: var(--royal-dark); }
button.ghost { background: transparent; color: var(--royal); }
button.ghost:hover { background: var(--paper); }
button.danger { background: transparent; color: var(--stop); border-color: var(--stop); }
button:disabled { opacity: 0.5; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 1.25rem; }

/* értesítés */
.notice { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; border-left: 4px solid; }
.notice.ok { background: var(--ok-bg); border-color: var(--ok); }
.notice.stop { background: var(--stop-bg); border-color: var(--stop); }
.notice.info { background: var(--sheet); border-color: var(--royal); }
.toast { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 50; max-width: 380px; box-shadow: 0 6px 24px rgba(30, 43, 74, 0.18); }

/* táblázatok */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-size: var(--fs-s); color: var(--graphite); font-weight: 400; padding: 0.5rem 0.6rem; border-bottom: 2px solid var(--ink); }
td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
tr.changed td { background: #FFFBDD; }
td.cat-src b { display: block; }
td .default { font-size: var(--fs-s); color: var(--graphite); }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1rem; }
.toolbar input[type=text] { max-width: 320px; }

/* feed linkek */
.copy-row { display: flex; gap: 0.5rem; align-items: center; padding: 0.4rem 0; border-bottom: 1px solid var(--rule); }
.copy-row code { flex: 1; overflow-wrap: anywhere; font-size: var(--fs-s); }

/* napló */
.log {
  background: var(--ink); color: #E8ECF5; border-radius: 4px; padding: 1rem 1.25rem; margin: 0;
  max-height: 560px; overflow: auto; font-size: 0.8125rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
.log .err { color: #FFB4A6; }

/* belépés */
.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background:
    linear-gradient(90deg, transparent 72px, rgba(184, 64, 46, 0.35) 72px, rgba(184, 64, 46, 0.35) 74px, transparent 74px),
    repeating-linear-gradient(transparent 0 31px, var(--rule) 31px 32px),
    var(--paper);
}
.login-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; padding: 2.25rem; width: 100%; max-width: 400px; }
.login-card h1 { font-size: var(--fs-xxl); margin-bottom: 0.4rem; }
.login-card form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }

dialog { border: 1px solid var(--rule); border-radius: 6px; padding: 1.75rem; max-width: 460px; width: calc(100% - 2rem); color: var(--ink); }
dialog::backdrop { background: rgba(30, 43, 74, 0.35); }
dialog form { display: flex; flex-direction: column; gap: 1rem; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { border-right: none; border-bottom: 1px solid var(--rule); padding: 1rem; gap: 0.75rem; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-title { display: none; }
  .side-foot { margin-top: 0; }
  .main { padding: 1.25rem 1rem 3rem; }
  .client-row, .list-head { grid-template-columns: 1fr 1fr; }
  .list-head { display: none; }
  .ledger { grid-template-columns: 1fr; }
  .ledger dt { border-bottom: none; padding-bottom: 0; }
  .page-head h1 { font-size: var(--fs-xl); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* oldalsáv: állapot-pötty a bolt neve mellett */
.nav .state { width: 0.6rem; height: 0.6rem; padding: 0; border: none; border-radius: 50%; flex: none; }
.nav .state.ok { background: var(--ok); }
.nav .state.stop { background: var(--stop); }
.nav .state.run { background: var(--marker); box-shadow: 0 0 0 1.5px var(--ink); }
.nav .state.idle { background: var(--rule); }
.side-foot .actions { margin-top: 0.5rem; gap: 0.4rem; }
.side-foot button { font-size: var(--fs-s); padding: 0.35rem 0.7rem; margin-top: 0; }
.client-row > .state, .list-head > span:last-child { justify-self: end; }

/* Kezdés ellenőrzőlista */
.checklist { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.checklist .step { padding: 1.25rem 0 1.25rem 1.1rem; border-bottom: 1px solid var(--rule); border-left: 4px solid var(--rule); }
.checklist .step.done { border-left-color: var(--ok); }
.checklist .step.todo { border-left-color: var(--stop); }
.checklist .step.wait { border-left-color: var(--marker); }
.step-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.step-head h3 { font-size: 1.0625rem; }
.step.done .step-body { color: var(--graphite); }
.step-body .actions { margin-top: 0.75rem; }
.ok-line { color: var(--ok); font-weight: 700; }
pre.mail { background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 0.9rem 1rem; white-space: pre-wrap; font-family: inherit; font-size: 0.9375rem; margin: 0.5rem 0 0; max-width: 70ch; }
code.feed { font-size: var(--fs-s); overflow-wrap: anywhere; }
.btn.ghost-btn { background: transparent; color: var(--royal); }
.btn.ghost-btn:hover { background: var(--paper); }
a.btn:hover { background: var(--royal-dark); border-color: var(--royal-dark); color: #fff; }
.login-alt { margin: 1.25rem 0 0; font-size: var(--fs-s); line-height: 1.9; }
