/* Közös stílusok: változók, alapok, navbar, űrlapelemek, gombok, kártya, felugró ablak */
:root {
  --bg: #f7f8fa; --surface: #ffffff; --text: #1d2330; --muted: #5c6577;
  --line: #dde1e8; --accent: #1f5fbf; --accent-text: #ffffff;
  --ok: #1e7a3c; --err: #c0392b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171d; --surface: #1d222b; --text: #e8eaf0; --muted: #9aa3b5;
    --line: #2d3441; --accent: #6da3f0; --accent-text: #10141b;
    --ok: #5fc07f; --err: #ff7b6b;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
       background: var(--bg); color: var(--text); line-height: 1.55; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
main { max-width: 720px; margin: 0 auto; padding: 2rem 1rem 4rem; }
h1 { margin: 0 0 1rem; font-size: 1.75rem; }

/* Navbar */
header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.nav { max-width: 720px; margin: 0 auto; padding: 0 1rem; display: flex; align-items: center;
       justify-content: space-between; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 700; text-decoration: none; }
.menu { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.menu a { display: block; padding: .5rem .85rem; border-radius: 6px; text-decoration: none; color: var(--muted); }
.menu a:hover { color: var(--text); }
.menu a[aria-current="page"] { color: var(--accent); font-weight: 600;
       background: color-mix(in srgb, var(--accent) 12%, transparent); }
.menu .btn { margin-left: .25rem; }
.toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text);
          border-radius: 6px; padding: .4rem .65rem; font: inherit; cursor: pointer; }
@media (max-width: 600px) {
  .toggle { display: inline-block; }
  .menu { display: none; flex-direction: column; align-items: stretch; width: 100%; padding-bottom: .75rem; }
  .menu.open { display: flex; }
  .menu a { padding: .7rem .5rem; }
  .menu .btn { margin: .25rem 0 0 .5rem; }
}

/* Űrlapelemek */
form { display: grid; gap: 1rem; }
input, textarea { font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; padding: .6rem .8rem; width: 100%; }
textarea { min-height: 140px; resize: vertical; }
label { display: grid; gap: .3rem; font-weight: 600; font-size: .95rem; }
label small { font-weight: 400; color: var(--muted); }

/* Gombok */
.btn { font: inherit; padding: .45rem .9rem; border-radius: 6px; cursor: pointer;
       background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
.btn.danger { color: var(--err); }
.btn:disabled { opacity: .6; cursor: wait; }

/* Állapotüzenetek */
.status { margin: 0 0 1rem; color: var(--muted); }
.error { color: var(--err) !important; }
.success { color: var(--ok) !important; }

/* Kártya és lista */
.list { list-style: none; margin: 0; padding: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
        padding: 1rem 1.25rem; margin-bottom: .75rem; }
.card h2 { margin: 0 0 .35rem; font-size: 1.05rem; color: var(--accent); }
.card p { margin: 0; color: var(--muted); white-space: pre-line; }

/* Felugró ablak */
dialog { border: 1px solid var(--line); border-radius: 8px; padding: 1.5rem; background: var(--surface);
         color: var(--text); width: min(520px, calc(100% - 2rem)); }
dialog::backdrop { background: rgba(0, 0, 0, .5); }
dialog h2 { margin: 0 0 1rem; }
.dlg-actions { display: flex; justify-content: flex-end; gap: .5rem; }
