/* Közös alapok – FaeArt foglaló. Színvilág: éjkék háttér + jáde + festékpötty-arany, a pontfestett mandalák alapján. */
:root {
  --ink: #1e2a33;          /* éjkék – a mandalák sötét alapja */
  --jade: #2f7a6b;         /* fő szín */
  --jade-deep: #22594e;
  --jade-wash: #e3efeb;
  --gold: #c9a227;         /* festékpötty */
  --lilac: #8e7cc3;
  --rose: #c4566a;         /* hiba, törlés */
  --rose-wash: #f8e6ea;
  --amber-wash: #fbf1d6;
  --paper: #eef3f1;        /* hideg, párás háttér */
  --card: #ffffff;
  --text: #1f2925;
  --muted: #5d6b66;
  --line: #d9e3df;
  --field: #ffffff;
  --shadow: 0 1px 2px rgba(30, 42, 51, .06), 0 6px 18px rgba(30, 42, 51, .06);
  --radius: 14px;
  --radius-s: 9px;
  --font-display: 'Marcellus', 'Palatino Linotype', Palatino, Georgia, serif;
  --font-body: 'Figtree', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --jade: #5fb39f; --jade-deep: #8fd0bf; --jade-wash: #1d3a34;
    --gold: #e0bd4c; --lilac: #ab9be0; --rose: #e57f91; --rose-wash: #43222a; --amber-wash: #3b3219;
    --paper: #141c21; --card: #1c262d; --text: #e5ece9; --muted: #9db0a9; --line: #2c3a41; --field: #172026;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 22px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 16px/1.55 var(--font-body); }
img { max-width: 100%; display: block; }
a { color: var(--jade); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.pre { white-space: pre-line; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--jade) 55%, transparent); outline-offset: 2px; border-radius: 6px; }

/* Gombok */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em; min-height: 42px; padding: .55em 1.1em;
  border: 1px solid transparent; border-radius: 999px; background: var(--jade); color: #fff; font: 600 .95rem var(--font-body);
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; white-space: nowrap;
}
@media (prefers-color-scheme: dark) { .btn { color: #0f1a17; } }
.btn:hover { background: var(--jade-deep); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--jade); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--jade); background: var(--jade-wash); }
.btn.danger { background: var(--rose); color: #fff; }
.btn.danger.ghost { background: transparent; color: var(--rose); border-color: var(--line); }
.btn.danger.ghost:hover { background: var(--rose-wash); border-color: var(--rose); }
.btn.small { min-height: 34px; padding: .3em .85em; font-size: .875rem; }
.btn.link { background: none; border: 0; color: var(--jade); padding: 0; min-height: 0; font-weight: 600; }
.btn.link:hover { text-decoration: underline; background: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; font-size: 1.15rem;
}
.icon-btn:hover { background: var(--jade-wash); color: var(--jade); }

/* Űrlapok */
.field { display: grid; gap: .3rem; margin-bottom: 1rem; }
.field > span, .label { font-weight: 600; font-size: .9rem; }
.field .hint { font-size: .82rem; color: var(--muted); }
.field .err { font-size: .85rem; color: var(--rose); font-weight: 600; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: .55em .8em; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--field); color: var(--text); font: inherit;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--jade); box-shadow: 0 0 0 3px color-mix(in srgb, var(--jade) 22%, transparent); }
input.invalid, textarea.invalid { border-color: var(--rose); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--jade); margin: 0; flex: none; }
.check { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.check > span { padding-top: 1px; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
.input-unit { display: flex; }
.input-unit input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-unit > span, .input-unit > select { flex: none; width: auto; display: grid; place-items: center; padding: 0 .8em; border: 1px solid var(--line); border-left: 0; border-radius: 0 var(--radius-s) var(--radius-s) 0; background: var(--paper); color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Pöttyök – szabad helyek jelzése (a pontfestés motívuma) */
.seats { display: inline-flex; gap: 5px; align-items: center; vertical-align: middle; }
.seats i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--gold); }
.seats i.taken { background: var(--gold); }
.seats.full i { border-color: var(--muted); background: var(--muted); opacity: .45; }

/* Állapot címkék */
.badge { display: inline-flex; align-items: center; gap: .35em; padding: .15em .65em; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--jade-wash); color: var(--jade-deep); white-space: nowrap; }
.badge.pending { background: var(--amber-wash); color: color-mix(in srgb, var(--gold) 70%, var(--text)); }
.badge.cancelled, .badge.rejected { background: var(--rose-wash); color: var(--rose); }
.badge.off { background: var(--paper); color: var(--muted); }

/* Modal */
.modal-back { position: fixed; inset: 0; background: rgba(15, 22, 27, .55); display: grid; place-items: center; padding: 1rem; z-index: 50; }
.modal { background: var(--card); border-radius: var(--radius); width: min(640px, 100%); max-height: calc(100dvh - 2rem); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem .6rem; }
.modal header h2 { margin: 0; font-size: 1.3rem; }
.modal .body { padding: .4rem 1.3rem 1rem; overflow: auto; }
.modal footer { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; padding: .9rem 1.3rem 1.2rem; border-top: 1px solid var(--line); }
@media (max-width: 560px) {
  .modal-back { padding: 0; place-items: end stretch; }
  .modal { border-radius: var(--radius) var(--radius) 0 0; max-height: 92dvh; }
}

/* Értesítés sáv */
.toasts { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); display: grid; gap: .5rem; z-index: 60; width: min(440px, calc(100% - 2rem)); }
.toast { background: var(--ink); color: #fff; padding: .8rem 1rem; border-radius: var(--radius-s); box-shadow: var(--shadow); font-weight: 500; }
.toast.error { background: var(--rose); }
@media (prefers-color-scheme: dark) { .toast { background: #e5ece9; color: #141c21; } .toast.error { background: var(--rose); color: #fff; } }

.notice { padding: .8rem 1rem; border-radius: var(--radius-s); background: var(--jade-wash); color: var(--text); font-size: .92rem; margin-bottom: 1rem; }
.notice.warn { background: var(--amber-wash); }
.notice.error { background: var(--rose-wash); }

.spinner { width: 34px; height: 34px; margin: 2rem auto; border-radius: 50%; border: 3px dotted var(--gold); animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } * { transition: none !important; } }
