/* COGMA Időpontfoglaló – közös alapok (belső naptár + foglalóoldal) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #f6f4f0; --surface: #ffffff; --surface-2: #faf8f5; --ink: #1d1a17; --ink-2: #3d3832; --muted: #6f675d; --line: #e6e0d6; --line-2: #d6cec2;
  --brand: #7a3e6e; --brand-ink: #ffffff; --brand-soft: #f3e9f0; --brand-text: var(--brand); --focus: #2f6fdb;
  --ok: #1f7a4d; --ok-soft: #e3f3ea; --warn: #9a6200; --warn-soft: #fbf0d9; --bad: #b42318; --bad-soft: #fde8e6; --info: #245b9e; --info-soft: #e5eef9;
  --off: repeating-linear-gradient(-45deg, #efebe4 0 6px, #f5f2ed 6px 12px);
  --shadow: 0 1px 2px rgba(30, 24, 18, .06), 0 4px 16px rgba(30, 24, 18, .08);
  --shadow-lg: 0 8px 40px rgba(30, 24, 18, .18);
  --r: 10px; --r-sm: 7px; --r-lg: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="vilagos"]) {
    --bg: #161412; --surface: #1f1c19; --surface-2: #26221e; --ink: #f2eee8; --ink-2: #d8d2c8; --muted: #a39a8e; --line: #34302b; --line-2: #45403a;
    --brand-soft: #3a2535; --brand-text: color-mix(in srgb, var(--brand) 45%, #ffffff); --ok-soft: #173327; --warn-soft: #3a2c10; --bad-soft: #3d1a17; --info-soft: #182a40;
    --ok: #5cc596; --warn: #e7b04a; --bad: #f2867b; --info: #7fb0ec;
    --off: repeating-linear-gradient(-45deg, #1b1916 0 6px, #211e1a 6px 12px);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .35); --shadow-lg: 0 8px 40px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-tema="sotet"] {
  --bg: #161412; --surface: #1f1c19; --surface-2: #26221e; --ink: #f2eee8; --ink-2: #d8d2c8; --muted: #a39a8e; --line: #34302b; --line-2: #45403a;
  --brand-soft: #3a2535; --brand-text: color-mix(in srgb, var(--brand) 45%, #ffffff); --ok-soft: #173327; --warn-soft: #3a2c10; --bad-soft: #3d1a17; --info-soft: #182a40;
  --ok: #5cc596; --warn: #e7b04a; --bad: #f2867b; --info: #7fb0ec;
  --off: repeating-linear-gradient(-45deg, #1b1916 0 6px, #211e1a 6px 12px);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .35); --shadow-lg: 0 8px 40px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.45 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; letter-spacing: -.01em; font-family: var(--font-display, var(--font)); font-weight: var(--cim-suly, 700); }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; }
p { margin: 0 0 .8em; }
a { color: var(--brand-text); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.rejtett, [hidden] { display: none !important; }
.ugro { position: absolute; left: -9999px; top: .5rem; z-index: 100; background: var(--surface); padding: .5rem .8rem; border-radius: var(--r-sm); }
.ugro:focus { left: .5rem; }
.halvany { color: var(--muted); }
.kicsi { font-size: .86rem; }
.szam { font-variant-numeric: tabular-nums; }
.sor { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.sor.koz { justify-content: space-between; }
.oszlop { display: flex; flex-direction: column; gap: .75rem; }
.nyujt { flex: 1 1 auto; min-width: 0; }

/* gombok */
.gomb { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 40px; padding: .5rem .95rem; border-radius: var(--r-gomb, var(--r-sm));
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 550; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .06s; -webkit-tap-highlight-color: transparent; }
.gomb:hover { background: var(--surface-2); }
.gomb:active { transform: translateY(1px); }
.gomb[disabled] { opacity: .5; pointer-events: none; }
.gomb.fo { background: var(--gomb, var(--brand)); border-color: var(--gomb, var(--brand)); color: var(--gomb-ink, var(--brand-ink)); }
.gomb.fo:hover { background: var(--gomb-hover, var(--gomb, var(--brand))); border-color: var(--gomb-hover, var(--gomb, var(--brand))); }
.gomb.veszely { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line-2)); }
.gomb.veszely.tele { background: var(--bad); color: #fff; border-color: var(--bad); }
.gomb.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.gomb.halk { border-color: transparent; background: transparent; }
.gomb.halk:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.gomb.kicsi { min-height: 32px; padding: .3rem .65rem; font-size: .86rem; }
.gomb.ikon { width: 40px; padding: 0; }
.gomb.ikon.kicsi { width: 32px; }
.gomb svg, .ikon-svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* űrlap */
.mezo { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.mezo > span, .mezo > label, .cimke { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.mezo small, .sugo { font-size: .8rem; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=url],
input[type=color], select, textarea {
  width: 100%; min-height: 40px; padding: .5rem .7rem; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); }
input[type=color] { padding: .2rem; width: 56px; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: 2px solid color-mix(in srgb, var(--focus) 25%, transparent); outline-offset: 0; }
.mezo.hibas input, .mezo.hibas select, .mezo.hibas textarea { border-color: var(--bad); }
.mezo .hibauzenet { color: var(--bad); font-size: .82rem; font-weight: 550; }
.racs-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.racs-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 560px) { .racs-2, .racs-3 { grid-template-columns: 1fr; } }

/* kapcsoló (Salonic: „rádiógomb”/csúszka) */
.kapcsolo { display: flex; align-items: flex-start; gap: .7rem; cursor: pointer; padding: .35rem 0; }
.kapcsolo input { appearance: none; -webkit-appearance: none; flex: none; width: 40px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.kapcsolo input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.kapcsolo input:checked { background: var(--ok); }
.kapcsolo input:checked::after { transform: translateX(16px); }
.kapcsolo .szoveg { display: flex; flex-direction: column; gap: .1rem; }
.kapcsolo .szoveg b { font-weight: 600; font-size: .94rem; }
.kapcsolo .szoveg small { color: var(--muted); font-size: .82rem; }
input[type=checkbox].pipa { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; flex: none; }

/* kártya, címkék */
.kartya { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; }
.kartya > h3:first-child, .kartya > h2:first-child { margin-top: 0; }
.cimkek { display: flex; gap: .35rem; flex-wrap: wrap; }
.jel { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .5rem; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.jel.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.jel.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.jel.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.jel.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.jel.brand { background: var(--brand-soft); color: var(--brand-text); border-color: transparent; }
.doboz { padding: .7rem .85rem; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: .9rem; }
.doboz.warn { background: var(--warn-soft); border-color: transparent; color: var(--ink); }
.doboz.bad { background: var(--bad-soft); border-color: transparent; }
.doboz.info { background: var(--info-soft); border-color: transparent; }
.doboz.ok { background: var(--ok-soft); border-color: transparent; }

/* ablak (modal) és oldalpanel */
.hatter { position: fixed; inset: 0; background: rgba(20, 16, 12, .42); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 1rem;
  animation: halvanyodik .12s ease-out; }
.ablak { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100dvh - 2rem); display: flex; flex-direction: column;
  animation: felbukkan .14s ease-out; }
.ablak.szeles { width: min(880px, 100%); }
.ablak-fej { display: flex; align-items: center; gap: .5rem; padding: .9rem 1rem .6rem 1.2rem; border-bottom: 1px solid var(--line); }
.ablak-fej h2 { margin: 0; font-size: 1.1rem; flex: 1; }
.ablak-test { padding: 1rem 1.2rem; overflow: auto; flex: 1; }
.ablak-lab { display: flex; gap: .5rem; justify-content: flex-end; padding: .75rem 1.2rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ablak-lab .bal { margin-right: auto; }
@media (max-width: 640px) {
  .hatter { align-items: flex-end; padding: 0; }
  .ablak, .ablak.szeles { width: 100%; max-height: 94dvh; border-radius: var(--r-lg) var(--r-lg) 0 0; animation: alulrol .18s ease-out; }
  .ablak-lab { padding-bottom: max(.75rem, env(safe-area-inset-bottom)); }
}
@keyframes halvanyodik { from { opacity: 0; } }
@keyframes felbukkan { from { opacity: 0; transform: translateY(6px) scale(.985); } }
@keyframes alulrol { from { transform: translateY(40px); opacity: .4; } }

/* értesítés (toast) */
#uzenetek { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: .5rem; align-items: center; pointer-events: none; width: min(520px, calc(100% - 1.5rem)); }
.uzenet { pointer-events: auto; display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem .7rem 1rem; border-radius: var(--r); background: #24201c; color: #f6f2ec; box-shadow: var(--shadow-lg);
  font-size: .93rem; animation: felbukkan .15s ease-out; width: 100%; }
.uzenet.hiba { background: #7c1d14; }
.uzenet .gomb { min-height: 32px; padding: .25rem .65rem; background: transparent; color: #ffd9a8; border-color: rgba(255,255,255,.2); }
@media (max-width: 760px) { #uzenetek { bottom: calc(72px + env(safe-area-inset-bottom)); } }

.toltes { display: inline-block; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: forog .7s linear infinite; vertical-align: middle; }
@keyframes forog { to { transform: rotate(360deg); } }
.ures { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
