/* FitAdmin design tokenek: narancs primary + zöld accent (OKLCH), light+dark data-theme-mel.
   Téma: a head-szkript mindig beállítja a html[data-theme]-et (localStorage vagy rendszer);
   a @media blokk csak a JS-mentes fallback. */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --primary: oklch(54% 0.17 42);            /* szöveg-szintű narancs, AA fehéren */
  --primary-strong: oklch(48% 0.16 42);
  --primary-soft: oklch(94.5% 0.035 55);
  --primary-vivid: oklch(70.5% 0.187 47);   /* töltött gombok, márka-narancs */
  --primary-vivid-hover: oklch(66% 0.19 45);
  --on-vivid: oklch(20% 0.02 45);           /* sötét szöveg a naranccson */
  --accent: oklch(51% 0.13 152);
  --danger: oklch(52% 0.19 27);
  --danger-soft: oklch(94.5% 0.03 27);
  --ok: oklch(51% 0.13 152);
  --ok-soft: oklch(94.5% 0.05 152);
  --warn: oklch(52% 0.12 75);
  --warn-soft: oklch(95% 0.055 90);
  --bg: oklch(97.4% 0.004 80);
  --surface: oklch(100% 0 0);
  --surface-2: oklch(95.5% 0.006 75);
  --text: oklch(24% 0.012 50);
  --text-muted: oklch(50% 0.02 55);
  --border: oklch(89% 0.008 70);
  --nav-bg: oklch(23% 0.014 55);            /* a sidebar mindkét témában sötét */
  --nav-hover: oklch(28.5% 0.016 55);
  --nav-text: oklch(78% 0.012 65);
  --nav-text-strong: oklch(95% 0.005 75);
  --nav-border: oklch(31% 0.015 55);
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px oklch(24% 0.012 50 / .06), 0 4px 14px oklch(24% 0.012 50 / .05);
  --sidebar-w: 216px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --primary: oklch(76% 0.15 55);
  --primary-strong: oklch(82% 0.14 60);
  --primary-soft: oklch(29% 0.05 45);
  --primary-vivid: oklch(70.5% 0.187 47);
  --primary-vivid-hover: oklch(74.5% 0.18 50);
  --on-vivid: oklch(18% 0.02 45);
  --accent: oklch(78% 0.15 155);
  --danger: oklch(72% 0.16 25);
  --danger-soft: oklch(27% 0.06 25);
  --ok: oklch(78% 0.15 155);
  --ok-soft: oklch(28% 0.05 155);
  --warn: oklch(80% 0.12 85);
  --warn-soft: oklch(28% 0.05 85);
  --bg: oklch(16.5% 0.008 55);
  --surface: oklch(20.5% 0.01 55);
  --surface-2: oklch(24.5% 0.012 55);
  --text: oklch(93% 0.006 75);
  --text-muted: oklch(69% 0.015 65);
  --border: oklch(31% 0.014 55);
  --nav-bg: oklch(18.5% 0.01 55);
  --nav-hover: oklch(25% 0.014 55);
  --nav-text: oklch(76% 0.012 65);
  --nav-text-strong: oklch(95% 0.005 75);
  --nav-border: oklch(29% 0.014 55);
  --shadow: 0 1px 3px oklch(0% 0 0 / .45);
}

/* JS nélküli fallback: rendszer-sötét, ha nincs data-theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --primary: oklch(76% 0.15 55);
    --primary-strong: oklch(82% 0.14 60);
    --primary-soft: oklch(29% 0.05 45);
    --primary-vivid-hover: oklch(74.5% 0.18 50);
    --on-vivid: oklch(18% 0.02 45);
    --accent: oklch(78% 0.15 155);
    --danger: oklch(72% 0.16 25);
    --danger-soft: oklch(27% 0.06 25);
    --ok: oklch(78% 0.15 155);
    --ok-soft: oklch(28% 0.05 155);
    --warn: oklch(80% 0.12 85);
    --warn-soft: oklch(28% 0.05 85);
    --bg: oklch(16.5% 0.008 55);
    --surface: oklch(20.5% 0.01 55);
    --surface-2: oklch(24.5% 0.012 55);
    --text: oklch(93% 0.006 75);
    --text-muted: oklch(69% 0.015 65);
    --border: oklch(31% 0.014 55);
    --nav-bg: oklch(18.5% 0.01 55);
    --nav-hover: oklch(25% 0.014 55);
    --nav-border: oklch(29% 0.014 55);
    --shadow: 0 1px 3px oklch(0% 0 0 / .45);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; font-weight: 800; letter-spacing: -0.015em; margin: 0 0 6px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 10px; display: flex; align-items: center; gap: 7px; }
h3 { font-size: 14px; font-weight: 700; margin: 14px 0 6px; }
p { margin: 8px 0; }
.muted { color: var(--text-muted); font-weight: 400; }
:focus-visible { outline: 3px solid var(--primary-vivid); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---- Admin váz (LexTime-minta): sötét sidebar + topbar + teljes szélességű tartalom ---- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 60;
  width: var(--sidebar-w);
  background: var(--nav-bg); color: var(--nav-text);
  display: flex; flex-direction: column;
  padding: 10px;
  transition: transform .2s ease;
}
.sidebar-brand { padding: 6px 8px 12px; }
.sidebar-brand a { display: flex; align-items: center; gap: 9px; font-size: 16.5px; font-weight: 800; letter-spacing: -0.01em; color: var(--nav-text-strong); }
.sidebar-brand a:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--primary-vivid); color: var(--on-vivid); font-size: 15px; font-weight: 800;
}
.brand-name .brand-accent { color: var(--primary-vivid); }
.sidenav { flex: 1; display: flex; flex-direction: column; gap: 1px; overflow-y: auto; }
.nav-section {
  padding: 14px 10px 4px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--nav-text);
  opacity: .62;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; min-height: 36px; border-radius: var(--radius-sm);
  color: var(--nav-text); font-weight: 600; font-size: 14px;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--nav-hover); color: var(--nav-text-strong); text-decoration: none; }
.nav-item.is-active { background: var(--primary-vivid); color: var(--on-vivid); }
.nav-item svg { flex: none; }
.sidebar-foot { border-top: 1px solid var(--nav-border); padding: 10px 10px 4px; }
.sidebar-public { display: inline-flex; align-items: center; gap: 7px; color: var(--nav-text); font-size: 13px; font-weight: 600; }
.sidebar-public:hover { color: var(--nav-text-strong); text-decoration: none; }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 8px 20px; min-height: 54px;
}
.topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title h1 { font-size: 17px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tenant-chip {
  flex: none; font-size: 12.5px; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.topbar-user { display: flex; align-items: center; gap: 10px; flex: none; }
.topbar-user form { margin: 0; }
.user-meta { text-align: right; line-height: 1.25; }
.user-name { font-weight: 700; font-size: 13.5px; }
.user-role { font-size: 12.5px; color: var(--text-muted); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--primary-vivid); color: var(--on-vivid);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: transparent; color: var(--text-muted);
  cursor: pointer; transition: background .15s, color .15s; flex: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.nav-toggle { display: none; }

.content { flex: 1; padding: 18px 22px 48px; min-width: 0; }

.nav-backdrop { position: fixed; inset: 0; z-index: 55; background: oklch(0% 0 0 / .45); border: 0; padding: 0; }
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px oklch(0% 0 0 / .35); }
  .main { margin-left: 0; }
  .nav-toggle { display: inline-flex; }
  .hide-sm { display: none; }
  .topbar { padding: 8px 12px; }
  .content { padding: 14px 12px 48px; }
}

/* ---- Gombok ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font: inherit; font-weight: 700; font-size: 14px;
  padding: 7px 14px; min-height: 36px; cursor: pointer;
  transition: background .15s, transform .12s;
  text-decoration: none !important;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary-vivid); color: var(--on-vivid); }
.btn-primary:hover { background: var(--primary-vivid-hover); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: var(--surface); }
.btn-block { width: 100%; }
.btn-lg { padding: 12px 22px; font-size: 16px; min-height: 44px; }
.btn-sm { padding: 4px 9px; min-height: 30px; font-size: 13.5px; }
.btn.is-disabled { opacity: .4; pointer-events: none; }
.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-row form { margin: 0; }

/* Téma-váltó: light-ban hold (sötétre vált), darkban nap. */
.theme-toggle { flex: none; }
.theme-toggle .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .theme-icon-sun { display: inline; }
[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }

/* ---- Kártyák, rács ---- */
/* A kártya alap paddingtalan: a fejléce .card-head, a tartalma .card-body,
   a flush táblázat közvetlen gyerekként ül benne (LexTime-minta). */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 0; margin-bottom: 12px; overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 9px 14px; min-height: 46px; border-bottom: 1px solid var(--border);
}
.card-head h2 { margin: 0; font-size: 15px; }
.card-head .search-row { margin: 0; flex: 1; max-width: 380px; min-width: 220px; }
.card-body { padding: 12px 14px; }
.card-body > :first-child { margin-top: 0; }
.card-body > :last-child { margin-bottom: 0; }
.card-empty { padding: 12px 14px; margin: 0; color: var(--text-muted); }
.card-foot { padding: 8px 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.card-foot p { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; margin-bottom: 12px; }
.grid-2 .card { margin-bottom: 0; }
.grid-2 .grow { grid-row: span 2; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

/* A page-head már csak akció-sor: az oldalcím a topbarban él. */
.page-head { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.page-head-note { display: flex; align-items: center; gap: 8px; margin-right: auto; }

/* ---- Flash ---- */
.flash { padding: 9px 12px; border-radius: var(--radius-sm); margin-bottom: 10px; font-weight: 600; }
.flash-success { background: var(--ok-soft); color: var(--ok); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.flash-warn { background: var(--warn-soft); color: var(--warn); }

/* ---- Badge, dot ---- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-muted); vertical-align: middle;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-lg { width: 16px; height: 16px; }

/* ---- Űrlapok ---- */
label { display: block; font-weight: 600; font-size: 13.5px; margin: 8px 0; }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px;
  font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 10px; min-height: 38px;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary-vivid); outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary-vivid) 25%, transparent); }
input[type="color"] { padding: 4px; height: 38px; }
input[type="checkbox"] { display: inline-block; width: 20px; height: 20px; min-height: 0; margin: 0 6px 0 0; vertical-align: -4px; accent-color: var(--primary-vivid); }
.check-label { display: flex; align-items: center; gap: 4px; }
textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 8px; margin-top: 10px; }
.form-card { max-width: 680px; padding: 14px 16px; }
.search-row { display: flex; gap: 8px; margin-bottom: 10px; }
.search-row input { margin-top: 0; }

/* ---- Sorok, listák ---- */
.mini-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 2px; border-bottom: 1px solid var(--border); font-size: 14px;
}
.mini-row:last-child { border-bottom: none; }
.mini-row > span:first-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.linkrow { color: inherit; }
.linkrow:hover { text-decoration: none; background: var(--surface-2); border-radius: var(--radius-sm); }
.card-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 6px; }

.event-row { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--border); color: inherit; }
.event-row:last-of-type { border-bottom: none; }
.event-time { font-weight: 800; font-variant-numeric: tabular-nums; }
.event-name { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.event-meta { margin-left: auto; color: var(--text-muted); font-size: 14px; display: inline-flex; align-items: center; gap: 5px; }
.event-facts { display: flex; gap: 16px; flex-wrap: wrap; font-weight: 600; font-size: 15px; }
.event-facts span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); }
.attendee-row form { margin: 0; }

/* ---- Táblázat ---- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.table thead th { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
/* Flush táblázat kártyában: a szélső cellák a kártya-paddinghez igazodnak. */
.card .table th:first-child, .card .table td:first-child { padding-left: 14px; }
.card .table th:last-child, .card .table td:last-child { padding-right: 14px; }
.card .table tbody tr:last-child td { border-bottom: none; }
.table .sub-cell { display: block; font-size: 12.5px; color: var(--text-muted); font-weight: 400; }
.table .cell-actions { text-align: right; white-space: nowrap; }
.table .cell-actions form { display: inline-flex; margin: 0; vertical-align: middle; }
.table .cell-actions .btn-row { display: inline-flex; flex-wrap: nowrap; justify-content: flex-end; }
.table td .dot { margin-right: 4px; vertical-align: 1px; }
tr[data-href] { cursor: pointer; }

/* ---- Statok ---- */
.stat-row { display: flex; gap: 20px; flex-wrap: wrap; }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.stat-value { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}
.stat-card .stat-value { font-size: 22px; color: var(--primary); line-height: 1.15; }
.stat-card .stat-label { margin-top: 2px; }
.stat-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 1px; }

/* ---- Heti rács (admin) ---- */
.week-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
@media (max-width: 1000px) { .week-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .week-grid { grid-template-columns: 1fr; } }
.week-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; min-height: 100px; }
.week-col.is-today { border-color: var(--primary-vivid); box-shadow: 0 0 0 1px var(--primary-vivid); }
.week-col-head { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.event-card {
  display: block; background: var(--surface-2);
  border-radius: var(--radius-sm); padding: 6px 8px; margin-bottom: 6px; color: inherit;
  font-size: 13px; transition: transform .12s, background .15s;
}
.event-card::before {
  content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--event-color, var(--primary-vivid)); margin-right: 7px; vertical-align: 1px;
}
.event-card:hover { text-decoration: none; transform: translateY(-1px); }
.event-card .event-name { display: block; font-size: 13.5px; }
.event-card .event-meta { display: flex; margin: 0; font-size: 12.5px; }
.event-card.is-cancelled { opacity: .5; text-decoration: line-through; }
.add-slot {
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 6px; color: var(--text-muted);
}
.add-slot:hover { background: var(--surface-2); text-decoration: none; }

/* ---- Nap-blokkok (publikus + member) ---- */
.day-block { margin-bottom: 20px; }
.day-head { font-weight: 800; font-size: 15px; margin-bottom: 8px; color: var(--text-muted); text-transform: capitalize; }

/* ---- Vendég (member) app-nézet ---- */
/* A sűrű méretek az adminnak szólnak; a vendég- és auth-felület mobil-első marad (44px targetek). */
body.member, body.guest-body { font-size: 16px; }
body.member .btn, body.guest-body .btn {
  min-height: 44px; padding: 10px 16px; font-size: 15px;
}
body.member .btn-sm, body.guest-body .btn-sm { min-height: 40px; padding: 6px 10px; font-size: 14px; }
body.member input, body.member select, body.member textarea,
body.guest-body input, body.guest-body select, body.guest-body textarea {
  min-height: 44px; padding: 10px 12px;
}
body.member label, body.guest-body label { font-size: 14.5px; margin: 10px 0; }
body.member .card, body.guest-body .card { padding: 16px 18px; margin-bottom: 14px; }
body.member { padding-bottom: 88px; }
.member-head { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.member-head-inner {
  max-width: 640px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.member-head form { margin: 0; }
.member-head-actions { display: flex; align-items: center; gap: 6px; }
.brand-sm { font-weight: 800; font-size: 17px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-main { max-width: 640px; margin: 0 auto; padding: 18px 16px; }
.member-title { font-size: 24px; margin-bottom: 16px; }
.member-sub { margin-top: 22px; }
.member-week-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.member-event { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 8px; }
.member-event-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.member-event-main .muted { font-size: 13.5px; }
.member-event-action form { margin: 0; }
.event-time-lg { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 14px; border-radius: 12px; min-width: 68px; min-height: 56px;
  color: var(--text-muted); font-size: 12px; font-weight: 700;
}
.tabbar a:hover { text-decoration: none; }
.tabbar a.is-active { background: var(--primary-soft); color: var(--primary); }

.pass-card { padding: 16px 18px; }
.pass-card.is-muted { opacity: .55; }
.pass-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.pass-credits { font-size: 26px; font-weight: 800; }
.pass-credits .muted { font-size: 15px; font-weight: 600; }

/* ---- Auth + landing + publikus ---- */
.guest-body { display: flex; min-height: 100vh; }
.guest-main { margin: auto; width: 100%; max-width: 960px; padding: 40px 16px; }
.guest-theme { position: fixed; top: 12px; right: 12px; z-index: 60; }
.auth-card {
  max-width: 420px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 24px;
}
.auth-card h1 { font-size: 22px; }
.brand-lg { font-size: 26px; font-weight: 800; margin-bottom: 14px; }
.brand-lg span { color: var(--primary); }
.auth-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; font-size: 14.5px; }

.landing { text-align: center; }
.landing h1 { justify-content: center; font-size: 34px; line-height: 1.2; letter-spacing: -0.02em; }
.landing .lead, .studio-hero .lead { font-size: 18px; color: var(--text-muted); max-width: 620px; margin: 12px auto 0; }
.landing-cta { display: flex; justify-content: center; gap: 12px; margin: 26px 0 40px; flex-wrap: wrap; }
.landing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; text-align: left; }
.landing-grid .card { margin: 0; }
.landing-grid h3 { margin: 10px 0 6px; }
.landing-grid p { color: var(--text-muted); font-size: 14.5px; margin: 0; }
.landing-grid svg { color: var(--primary); }

.studio-page { max-width: 760px; margin: 0 auto; }
.studio-hero { text-align: center; margin-bottom: 34px; }
.studio-hero h1 { justify-content: center; font-size: 30px; }
.studio-meta { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 12px; color: var(--text-muted); font-size: 14.5px; }
.studio-meta span { display: inline-flex; align-items: center; gap: 6px; }
.studio-page .event-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 8px; }

/* ---- Shop, üzenetek, elszámolás ---- */
.flash-info { background: color-mix(in oklab, var(--primary) 10%, var(--surface)); border: 1px solid color-mix(in oklab, var(--primary) 35%, var(--border)); color: var(--text); }
.shop-option { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.shop-option:has(input:checked) { border-color: var(--primary-vivid); background: var(--primary-soft); }
.shop-option input[type="radio"] { width: 18px; height: 18px; accent-color: var(--primary-vivid); flex: none; margin: 0; min-height: 0; }
.shop-option-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.shop-option-price { white-space: nowrap; }
.shop-result { text-align: center; }
.shop-result-icon { display: flex; justify-content: center; margin: 8px 0 4px; color: var(--text-muted); }
.shop-result-icon.is-ok { color: var(--ok); }
.shop-result-icon.is-err { color: var(--danger); }
.shop-result .btn { margin-top: 10px; }
.fee-form { display: flex; align-items: center; gap: 6px; flex: none; }
.fee-form input[type="number"] { width: 110px; margin: 0; }
.inline-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin: 0; }
.inline-form label { margin: 0; }
.inline-form input { margin-top: 4px; }
/* Kártya-fejlécben az inline szűrő egysoros, hogy ne hizlalja a fejlécet. */
.card-head .inline-form label { display: flex; align-items: center; gap: 8px; }
.card-head .inline-form input { margin-top: 0; width: auto; }
.table-wrap { overflow-x: auto; }

/* ---- Modál: create/edit űrlapok (data-modal nyitja, data-modal-close/Esc/háttér zárja) ---- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none;
  padding: 42px 16px; background: oklch(12% 0.01 55 / .55); overflow-y: auto;
}
.modal.open { display: block; }
.modal-dialog {
  width: 100%; max-width: 620px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 18px 50px oklch(0% 0 0 / .35);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
}
.modal-head h2 { margin: 0; font-size: 16px; }
.modal-body { padding: 10px 16px 16px; }
.modal-body > :first-child label:first-child { margin-top: 0; }

/* ---- Arculat-beállítás: preset-paletták ---- */
.brand-presets { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 2px; }
.brand-preset {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border: 1px solid var(--border); border-radius: 999px;
  background: transparent; color: var(--text-muted);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s;
}
.brand-preset:hover { background: var(--surface-2); color: var(--text); }
.brand-chip { width: 14px; height: 14px; border-radius: 50%; flex: none; border: 1px solid oklch(0% 0 0 / .12); }
.brand-chip + .brand-chip { margin-left: -9px; }

/* ---- Kulcs-érték adatlap-sorok ---- */
.kv-list { display: grid; gap: 2px; }
.kv { display: flex; gap: 12px; padding: 4px 0; font-size: 14px; }
.kv > span:first-child { flex: none; width: 130px; color: var(--text-muted); font-weight: 600; }
