/* ============================================================
   EgészségMonitor – Fő stíluslap
   Mobile-first, vanilla CSS3, nincs külső framework
   Fájl: assets/css/style.css
   Dátum: 2026-03-17
   ============================================================ */

/* -------------------------------------------------------
   CSS változók (design token-ek)
   ------------------------------------------------------- */
:root {
    --primary:       #1D9E75;   /* fő zöld szín */
    --primary-dark:  #0F6E56;   /* sötétebb zöld hover/aktív állapothoz */
    --primary-light: #e8f8f3;   /* halvány zöld háttér */
    --bg:            #f8f9fa;   /* oldal háttérszín */
    --card-bg:       #ffffff;   /* kártya háttér */
    --text:          #2c2c2a;   /* fő szövegszín */
    --text-muted:    #888780;   /* másodlagos szövegszín */
    --border:        #e0dfd8;   /* keret/elválasztó szín */
    --danger:        #e74c3c;   /* piros veszély szín */
    --warning:       #f39c12;   /* narancssárga figyelmeztetés */
    --success:       #1D9E75;   /* zöld siker szín */
    --radius:        12px;      /* kártya saroklekerekítés */
    --shadow:        0 2px 8px rgba(0, 0, 0, 0.08); /* enyhe árnyék */
    --nav-height:    64px;      /* alsó nav magassága */
    --top-height:    56px;      /* felső sáv magassága */
    --font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* -------------------------------------------------------
   Reset és alapbeállítások
   ------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;  /* padding beleszámít a méretbe */
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;         /* alap betűméret */
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    overscroll-behavior-y: none; /* mobil scroll túllövés tiltása */
}

/* -------------------------------------------------------
   Segédosztályok
   ------------------------------------------------------- */

/* Általános szöveg kiemelés */
.szin-primer    { color: var(--primary); }
.szin-veszely   { color: var(--danger); }
.szin-figyelem  { color: var(--warning); }
.szin-tompitott { color: var(--text-muted); }

/* Félkövér súly */
.felho { font-weight: 600; }

/* Kisebb másodlagos szöveg */
.kisebb { font-size: 0.75rem; }

/* -------------------------------------------------------
   Felső navigációs sáv (top bar)
   ------------------------------------------------------- */
.top-bar {
    position: fixed;           /* mindig látható tetején */
    top: 0;
    left: 0;
    right: 0;
    height: var(--top-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Belső konténer max-szélességgel */
.top-bar__inner {
    width: 100%;
    max-width: 480px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo szöveg és ikon */
.top-bar__logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

/* Mai dátum a fejlécben */
.top-bar__datum {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* -------------------------------------------------------
   Fő tartalom terület
   Felső és alsó nav magasságával eltolt
   ------------------------------------------------------- */
.main-content {
    margin-top: var(--top-height);    /* helyet hagy a felső navnak */
    padding-bottom: calc(var(--nav-height) + 16px); /* helyet hagy az alsó navnak */
    padding-top: 16px;
    min-height: calc(100vh - var(--top-height));
}

/* -------------------------------------------------------
   Oldal konténer – centrált, max 480px
   ------------------------------------------------------- */
.kontener {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px;
}

/* -------------------------------------------------------
   Kártya alap stílus
   ------------------------------------------------------- */
.kartya {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 12px;
}

/* Kártya fejléce (cím + jobb oldali adat) */
.kartya__fejlec {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

/* Kártya cím szöveg */
.kartya__cim {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Kártya fő értéke nagy betűmérettel */
.kartya__ertek {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text);
}

/* Kártya egysége (kisebb, tompított) */
.kartya__egyseg {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Kártya státusz badge */
.kartya__statusz {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    color: #fff;
    margin-top: 4px;
}

/* Kártya időbélyeg (kis szürke szöveg) */
.kartya__ido {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* -------------------------------------------------------
   2×2 kártya rácsrendszer a dashboardon
   ------------------------------------------------------- */
.kartya-racs {
    display: grid;
    grid-template-columns: 1fr 1fr;  /* két egyenlő oszlop */
    gap: 12px;
    margin-bottom: 12px;
}

/* Rácsban lévő kártyák kissé kisebb padding */
.kartya-racs .kartya {
    margin-bottom: 0;
    padding: 14px;
}

/* -------------------------------------------------------
   Köszöntő szekció a dashboardon
   ------------------------------------------------------- */
.koszonto {
    padding: 8px 0 4px;
    margin-bottom: 4px;
}

/* "Jó reggelt!" szöveg */
.koszonto__szoveg {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

/* Dátum a köszöntő alatt */
.koszonto__datum {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* -------------------------------------------------------
   Progress bar (haladásjelző sáv)
   ------------------------------------------------------- */
.progress-sor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

/* Progress bar szöveg cimke */
.progress-cimke {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Progress bar értéke jobbra igazítva */
.progress-ertek {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
}

/* Progress bar konténer (szürke háttér) */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

/* Progress bar kitöltés (zöld csík) */
.progress-bar__kitoltes {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 4px;           /* legalább kicsit látszik */
}

/* Progress bar 100% felett piros (túllépett cél) */
.progress-bar__kitoltes--tullepett {
    background: var(--danger);
}

/* -------------------------------------------------------
   Makró tápanyag badge-ek (fehérje / szénhidrát / zsír)
   ------------------------------------------------------- */
.makro-badgek {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Általános badge alap */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
}

/* Fehérje badge – kékes */
.badge--feherje {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Szénhidrát badge – narancs */
.badge--szenhidrat {
    background: #fef3c7;
    color: #92400e;
}

/* Zsír badge – rózsaszínes */
.badge--zsir {
    background: #fce7f3;
    color: #9d174d;
}

/* Kalória badge – zöld */
.badge--kcal {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* -------------------------------------------------------
   Alsó navigációs sáv (bottom navigation)
   6 gomb – vízszintesen görgethető, scrollbar elrejtve
   ------------------------------------------------------- */
.bottom-nav {
    position: fixed;           /* mindig látható az oldal alján */
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    overflow-x: auto;          /* vízszintes görgetés */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;     /* Firefox */
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0); /* iPhone notch kezelés */
}

/* Chromium/Safari scrollbar elrejtése */
.bottom-nav::-webkit-scrollbar {
    display: none;
}

/* Nav gomb / link általános stílus */
.bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 0 0 72px;            /* fix szélesség, nem zsugorodik */
    min-width: 72px;
    height: 100%;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.5625rem;      /* 9px – kissé kisebb hogy elférjen */
    font-weight: 500;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent; /* iOS kattintás fény tiltása */
}

/* Aktív nav elem – zöld szín */
.bottom-nav__item--aktiv {
    color: var(--primary);
}

/* Nav elem hover állapot */
.bottom-nav__item:hover {
    color: var(--primary);
}

/* Nav ikon SVG mérete */
.bottom-nav__ikon {
    width: 22px;
    height: 22px;
}

/* Nav szöveg felirat */
.bottom-nav__felirat {
    line-height: 1;
}

/* Középső nagy kerek "+" gomb */
.bottom-nav__kozep {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--primary);
    border-radius: 50%;             /* tökéletesen kerek */
    border: none;
    cursor: pointer;
    color: #fff;
    box-shadow: 0 4px 12px rgba(29, 158, 117, 0.4);
    transition: background 0.2s, transform 0.1s;
    flex: 0 0 72px;                 /* ugyanolyan széles mint a többi item */
    -webkit-tap-highlight-color: transparent;
    margin-bottom: 8px;             /* kicsit kiemelkedik a navból */
}

/* "+" gomb SVG mérete */
.bottom-nav__kozep svg {
    width: 24px;
    height: 24px;
}

/* "+" gomb hover */
.bottom-nav__kozep:hover {
    background: var(--primary-dark);
}

/* "+" gomb lenyomás animáció */
.bottom-nav__kozep:active {
    transform: scale(0.93);
}

/* -------------------------------------------------------
   Modal (lebegő ablak)
   ------------------------------------------------------- */

/* Modal háttér (sötét overlay) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    align-items: flex-end;        /* alulról csúszik fel (bottom sheet) */
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

/* Modal rejtett állapotban */
.modal-overlay[hidden] {
    display: none;
}

/* Modal doboz maga */
.modal {
    background: var(--card-bg);
    border-radius: var(--radius) var(--radius) 0 0;  /* csak felül lekerekített */
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    padding-bottom: env(safe-area-inset-bottom, 16px);
}

/* Modal fejléce (cím + bezárás gomb) */
.modal__fejlec {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--card-bg);
}

/* Modal cím szöveg */
.modal__cim {
    font-size: 1rem;
    font-weight: 600;
}

/* Bezárás gomb */
.modal__zar {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s;
}

/* Bezárás gomb hover */
.modal__zar:hover {
    background: var(--bg);
}

/* Bezárás gomb SVG mérete */
.modal__zar svg {
    width: 20px;
    height: 20px;
}

/* Modal menüpontok listája */
.modal__lista {
    padding: 8px 12px 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;  /* 2 oszlopos rács */
    gap: 8px;
}

/* Egy modal menüpont */
.modal__pont {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--bg);
    transition: background 0.15s;
}

/* Modal pont hover */
.modal__pont:hover {
    background: var(--primary-light);
}

/* Modal pont ikon kör */
.modal__pont-ikon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* -------------------------------------------------------
   Szekció cím (pl. "Mai adatok", "Legutóbbi étkezés")
   ------------------------------------------------------- */
.szekcion-cim {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 16px 0 8px;
}

/* -------------------------------------------------------
   Étkezés kártya
   ------------------------------------------------------- */
.etkezes-kartya__leiras {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.4;
}

/* -------------------------------------------------------
   Napló oldal – bejegyzés lista
   ------------------------------------------------------- */
.naplo-lista {
    list-style: none;
}

/* Egy napló bejegyzés */
.naplo-elem {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px;
    margin-bottom: 8px;
    position: relative;
}

/* Napló elem bal oldali színes jelző pont */
.naplo-elem__jelzo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Napló elem szöveg tartalom */
.naplo-elem__tartalom {
    flex: 1;
    min-width: 0;
}

/* Napló elem fő értéke */
.naplo-elem__ertek {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Napló elem időbélyege */
.naplo-elem__ido {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* -------------------------------------------------------
   Űrlap stílusok
   ------------------------------------------------------- */

/* Űrlap csoport (label + input együtt) */
.form-csoport {
    margin-bottom: 14px;
}

/* Mező cimke */
.form-cimke {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}

/* Szöveg input és textarea */
.form-mezo,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--card-bg);
    transition: border-color 0.2s;
    outline: none;
    -webkit-appearance: none;
}

/* Mező fókuszban – zöld keret */
.form-mezo:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.15);
}

/* Textarea mérete */
.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Elsődleges gomb */
.gomb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font);
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

/* Teljes szélességű gomb */
.gomb--teljes {
    width: 100%;
}

/* Zöld (elsődleges) gomb */
.gomb--primer {
    background: var(--primary);
    color: #fff;
}

/* Zöld gomb hover */
.gomb--primer:hover {
    background: var(--primary-dark);
}

/* Gomb lenyomás */
.gomb--primer:active {
    transform: scale(0.97);
}

/* Másodlagos (körvonal) gomb */
.gomb--masodlagos {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

/* Másodlagos gomb hover */
.gomb--masodlagos:hover {
    background: var(--primary-light);
}

/* -------------------------------------------------------
   Fül navigáció (tab bar) – pl. napló típusok között
   ------------------------------------------------------- */
.tab-nav {
    display: flex;
    overflow-x: auto;             /* vízszintes scroll sok fülnél */
    gap: 6px;
    padding: 0 0 8px;
    scrollbar-width: none;        /* Firefox – scrollbar elrejtése */
    -ms-overflow-style: none;
}

/* Chrome/Safari scrollbar elrejtése */
.tab-nav::-webkit-scrollbar {
    display: none;
}

/* Egy fül gomb */
.tab-nav__gomb {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
    -webkit-tap-highlight-color: transparent;
}

/* Aktív fül */
.tab-nav__gomb--aktiv {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* -------------------------------------------------------
   Üres állapot (ha nincs adat)
   ------------------------------------------------------- */
.ures-allapot {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* Üres állapot ikon */
.ures-allapot__ikon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

/* Üres állapot szöveg */
.ures-allapot__szoveg {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* -------------------------------------------------------
   Toast értesítés (rövid visszajelzés alulról)
   ------------------------------------------------------- */
.toast {
    position: fixed;
    bottom: calc(var(--nav-height) + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a1a;
    color: #fff;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 300;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    white-space: nowrap;
    max-width: calc(100vw - 32px);
}

/* Toast megjelenítve */
.toast--latszik {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* -------------------------------------------------------
   Célkövetés szekció (index.php)
   ------------------------------------------------------- */

/* Egy célkövetés sor (ikon + név + progress) */
.cel-sor {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* Utolsó sornak nincs border */
.cel-sor:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Fejsor: bal (ikon + név) és jobb (teljesít / cél) */
.cel-sor__fejsor {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 5px;
}

/* Bal oldal: ikon + név + napi átlag */
.cel-sor__bal {
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

/* Ikon */
.cel-sor__ikon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Elem neve */
.cel-sor__nev {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

/* Napi átlag szürke szöveg (heti/havi) */
.cel-sor__atlag {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Jobb oldal: teljesített / cél */
.cel-sor__jobb {
    display: flex;
    align-items: baseline;
    gap: 1px;
    flex-shrink: 0;
}

/* Teljesített szám (színes) */
.cel-sor__teljesit {
    font-size: 0.85rem;
    font-weight: 700;
}

/* Cél szám (szürke) */
.cel-sor__cel {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Nincs adat felirat */
.cel-sor__nincs {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Progress bar + % egy sorban */
.cel-progress-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Szürke háttér csík */
.cel-progress-hatter {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

/* Kitöltés (szín JS/PHP-ból) */
.cel-progress-kitoltes {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
    min-width: 0;
}

/* Százalék szöveg */
.cel-szazalek {
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 38px;
    text-align: right;
    flex-shrink: 0;
}

/* Kalória keret szöveg (heti/havi) – régi, visszafelé compat */
.cel-sor__keretsz {
    font-size: 0.7rem;
    margin-top: 3px;
    font-weight: 500;
}

/* Időszak fejléc (heti/havi panel tetején) */
.cel-idoszak-fejlec {
    background: var(--bg);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 12px;
}

/* Tényleges dátumtartomány */
.cel-idoszak-datum {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
}

/* "X nap telt el, Y nap van még hátra" */
.cel-idoszak-info {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Értékelő sor (zöld/narancs/piros szöveg) */
.cel-sor__ertekelo {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 4px;
    line-height: 1.4;
}

/* "Ma eddig: X — napi célod Y" info sor */
.cel-sor__napi-info {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* "Eddig: X — kellett volna: Y (Z × N)" részlet sor */
.cel-sor__reszlet {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.4;
}

/* "(heti keret)" / "(havi keret)" cimke a cél száma után */
.cel-sor__keret-cimke {
    font-size: 0.58rem;
    color: var(--text-muted);
    margin-left: 2px;
    font-weight: 400;
}

/* -------------------------------------------------------
   Statisztika oldal – chart terület placeholder
   ------------------------------------------------------- */
.chart-kartya {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 12px;
}

/* Chart cím */
.chart-kartya__cim {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

/* SVG chart terület */
.chart-kartya__svg {
    width: 100%;
    overflow: visible;
}

/* -------------------------------------------------------
   Statisztika oldal – időszak fül navigáció
   ------------------------------------------------------- */

/* Fül navigáció konténer */
.stat-tab-nav {
    display: flex;
    gap: 8px;
    padding: 12px 0 4px;
}

/* Egy időszak fül */
.stat-tab {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

/* Aktív fül – zöld */
.stat-tab--aktiv {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Fül hover (nem aktív) */
.stat-tab:not(.stat-tab--aktiv):hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* -------------------------------------------------------
   Makró kördiagram jelmagyarázat
   ------------------------------------------------------- */

/* Egy sor a jelmagyarázatban */
.makro-legend-sor {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
}

/* Színes kör jelölő */
.makro-legend-pont {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Makró neve */
.makro-legend-cimke {
    flex: 1;
    color: var(--text-muted);
}

/* Makró értéke és százaléka */
.makro-legend-ertek {
    font-weight: 600;
    color: var(--text);
    font-size: 0.75rem;
}

/* -------------------------------------------------------
   Profil oldal
   ------------------------------------------------------- */

/* Profilkép kör */
.profil-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 12px;
}

/* Profil adat sor */
.profil-sor {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

/* Profil sor utolsó elem – nincs border */
.profil-sor:last-child {
    border-bottom: none;
}

/* Profil sor cimke */
.profil-sor__cimke {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Profil sor érték */
.profil-sor__ertek {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

/* -------------------------------------------------------
   Profil oldal – fejléc
   ------------------------------------------------------- */

/* Fejléc kártya centrált */
.profil-fejlec {
    text-align: center;
    padding: 24px 16px 20px;
}

/* Nagy monogram kör */
.profil-monogram {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    letter-spacing: -0.02em;
}

/* Profil neve */
.profil-nev {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

/* Profil meta adatok (kor, nem, aktivitás) */
.profil-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px 4px;
}

/* -------------------------------------------------------
   Profil oldal – üzenet (mentés visszajelzés)
   ------------------------------------------------------- */

/* Általános üzenet sáv */
.profil-uzenet {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 12px;
}

/* Sikeres mentés – zöld */
.profil-uzenet--siker {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* Hiba – piros */
.profil-uzenet--hiba {
    background: #fee2e2;
    color: #991b1b;
}

/* -------------------------------------------------------
   Profil oldal – makró célok körök
   ------------------------------------------------------- */

/* Három kör egy sorban */
.makro-kor-sor {
    display: flex;
    justify-content: space-around;
    gap: 8px;
}

/* Egy makró kör + cimke */
.makro-kor {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* Makró kör neve */
.makro-kor__nev {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-align: center;
}

/* -------------------------------------------------------
   Profil oldal – 3 oszlopos statisztika kártyák
   ------------------------------------------------------- */

/* Külső grid */
.stat-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

/* Kártya a rácsban */
.stat-3col__kartya {
    padding: 12px 8px;
    text-align: center;
    margin-bottom: 0;
}

/* Nagy szám */
.stat-3col__szam {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

/* Cimke alatta */
.stat-3col__cimke {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.3;
}

/* -------------------------------------------------------
   Animációk
   ------------------------------------------------------- */

/* Halványítás megjelenés */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Alulról felfelé csúszás */
@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* Kártya megjelenési animáció */
@keyframes kartya-bejon {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Kártya animáció alkalmazása */
.kartya {
    animation: kartya-bejon 0.3s ease both;
}

/* Késleltetett animáció 2. kártyától */
.kartya:nth-child(2) { animation-delay: 0.05s; }
.kartya:nth-child(3) { animation-delay: 0.10s; }
.kartya:nth-child(4) { animation-delay: 0.15s; }
.kartya:nth-child(5) { animation-delay: 0.20s; }

/* -------------------------------------------------------
   Reszponzív finomhangolás – tabletre
   (alapvetően 480px-en belül maradunk)
   ------------------------------------------------------- */
@media (min-width: 480px) {
    /* Konténer árnyéka szélesebb képernyőn */
    .main-content {
        padding-left: 0;
        padding-right: 0;
    }

    /* Bottom nav max szélességen belül */
    .bottom-nav {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }

    /* Top bar szintén centrált */
    .top-bar {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }
}

/* -------------------------------------------------------
   Napló lista – három pont menü
   ------------------------------------------------------- */

/* Három pont gomb */
.naplo-menu {
    position: relative;
    flex-shrink: 0;
    margin-left: auto;
    align-self: flex-start;
}

/* ⋮ gomb */
.naplo-menu__gomb {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 1.25rem;
    color: var(--text-muted);
    border-radius: 6px;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}
.naplo-menu__gomb:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* Dropdown lista */
.naplo-menu__lista {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 2px);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    min-width: 140px;
    z-index: 100;
    overflow: hidden;
}
.naplo-menu__lista--nyitva {
    display: block;
}

/* Egy menüelem */
.naplo-menu__elem {
    display: block;
    width: 100%;
    padding: 10px 14px;
    text-align: left;
    background: none;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    color: var(--text);
}
.naplo-menu__elem:hover {
    background: var(--primary-light);
}

/* Veszélyes (törlés) elem – piros */
.naplo-menu__elem--veszelyes {
    color: #dc2626;
}
.naplo-menu__elem--veszelyes:hover {
    background: #fee2e2;
}

/* -------------------------------------------------------
   Módosítási modal
   ------------------------------------------------------- */

/* Háttér overlay */
.modosit-modal__hatter {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 200;
}

/* Modal ablak */
.modosit-modal {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    background: var(--card-bg);
    border-radius: 16px 16px 0 0;
    z-index: 201;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Modal belső */
.modosit-modal__tartalom {
    padding: 16px 16px 24px;
}

/* Modal fejléc */
.modosit-modal__fejlec {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.modosit-modal__cim {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}
.modosit-modal__bezar {
    background: var(--bg);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}
.modosit-modal__bezar:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* Gombsor alul */
.modosit-modal__gombok {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.modosit-modal__gombok .gomb {
    flex: 1;
}

/* -------------------------------------------------------
   Profil – Veszélyes zóna
   ------------------------------------------------------- */

/* Vörös keretes kártya */
.veszelyes-zona {
    border: 1.5px solid #fca5a5;
    border-radius: var(--radius);
    padding: 16px;
    background: #fff5f5;
    margin-bottom: 12px;
}
.veszelyes-zona__cim {
    font-size: 0.85rem;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 4px;
}
.veszelyes-zona__leiras {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Gomb sor veszélyes zonában */
.veszelyes-zona__gombok {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Reset megerősítő input */
.reset-megerosito {
    display: none;
    margin-top: 8px;
    padding: 10px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid #fca5a5;
}
.reset-megerosito.aktiv {
    display: block;
}
.reset-megerosito__szoveg {
    font-size: 0.78rem;
    color: #dc2626;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* -------------------------------------------------------
   Étrend tervező – generálás spinner
   ------------------------------------------------------- */
.etrend-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: etrend-forog 0.9s linear infinite;
    margin: 0 auto;
}

@keyframes etrend-forog {
    to { transform: rotate(360deg); }
}

/* Betöltés sor */
.etrend-tolto-sor {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    justify-content: center;
}

/* Betöltés pont jelző */
.etrend-tolto-pont {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Várás állapot */
.etrend-tolto-pont--var {
    background: var(--border);
    color: var(--text-muted);
}

/* -------------------------------------------------------
   Étrend – korábbi terv kártya (etrend.php listában)
   ------------------------------------------------------- */
.korabbi-terv-kartya {
    margin-bottom: 8px;
    transition: opacity 0.3s, max-height 0.4s;
    overflow: hidden;
}

/* -------------------------------------------------------
   Étrend megjelenítés – nap accordion kártya
   ------------------------------------------------------- */
.etrend-nap-kartya {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 8px;
    overflow: hidden;
}

/* Nap fejléc gomb */
.etrend-nap-fejlec {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    gap: 8px;
    text-align: left;
}

/* Nap tartalom (accordion belső) */
.etrend-nap-tartalom {
    padding: 0 12px 12px;
}

/* -------------------------------------------------------
   Étrend – étkezés kártya
   ------------------------------------------------------- */
.etrend-etkezes-kartya {
    border-left: 3px solid var(--primary);
}

/* -------------------------------------------------------
   Étrend – makró badge-ek sora
   ------------------------------------------------------- */
.etrend-makro-sor {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Alap makró badge */
.etrend-makro-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
}

/* kcal */
.etrend-makro-badge--kcal {
    background: #fef3c7;
    color: #92400e;
}

/* Fehérje */
.etrend-makro-badge--f {
    background: #dbeafe;
    color: #1e40af;
}

/* Szénhidrát */
.etrend-makro-badge--szh {
    background: #d1fae5;
    color: #065f46;
}

/* Zsír */
.etrend-makro-badge--zs {
    background: #fce7f3;
    color: #9d174d;
}

/* -------------------------------------------------------
   Étrend – "Naplóba" gomb
   ------------------------------------------------------- */
.etrend-naplo-gomb {
    font-size: 0.72rem;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 4px 10px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
}

.etrend-naplo-gomb:hover {
    background: var(--primary);
    color: #fff;
}

/* Mentett állapot */
.etrend-naplo-gomb--mentve {
    background: #d1fae5 !important;
    color: #065f46 !important;
    border-color: #6ee7b7 !important;
    cursor: default !important;
}

/* "Elmentve [időpont]" felirat */
.etrend-naplo-mentve {
    font-size: 0.68rem;
    color: #059669;
    font-weight: 500;
}

/* -------------------------------------------------------
   Étrend – recept gomb és panel
   ------------------------------------------------------- */
.etrend-recept-gomb {
    font-size: 0.75rem;
    color: var(--primary);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-weight: 600;
}

.etrend-recept-panel {
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.6;
    border-left: 2px solid var(--primary);
}

/* -------------------------------------------------------
   Bevásárlólista – tételsor
   ------------------------------------------------------- */
.bevasarlo-tetel {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    transition: opacity 0.2s;
}

.bevasarlo-tetel:last-child {
    border-bottom: none;
}

/* Beszerzett tétel */
.bevasarlo-tetel--kesz .bevasarlo-nev {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Tétel neve */
.bevasarlo-nev {
    flex: 1;
    font-size: 0.82rem;
    color: var(--text);
}

/* Mennyiség */
.bevasarlo-menny {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: auto;
    flex-shrink: 0;
}

/* -------------------------------------------------------
   Napi összegző modal
   ------------------------------------------------------- */
.osszegzo-hatter {
    display: none;          /* alapban rejtett */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 300;
}

.osszegzo-hatter.latszik {
    display: block;
    animation: osszegzo-fade 0.25s ease;
}

@keyframes osszegzo-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.osszegzo-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    /* alapban rejtett — JS állítja display: flex-re */
    display: none;
    transform: translate(-50%, -50%);
    width: calc(100% - 32px);
    max-width: 400px;
    max-height: 90vh;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
    z-index: 301;
    flex-direction: column;
    overflow: hidden;
}

.osszegzo-modal.latszik {
    display: flex;
    animation: osszegzo-popup 0.3s cubic-bezier(.34,1.56,.64,1);
}

@keyframes osszegzo-popup {
    from { transform: translate(-50%, -48%) scale(0.95); opacity: 0; }
    to   { transform: translate(-50%, -50%) scale(1);    opacity: 1; }
}

/* Fejléc */
.osszegzo-fejlec {
    background: var(--primary);
    color: #fff;
    padding: 16px 16px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.osszegzo-bezar {
    background: rgba(255,255,255,.2);
    border: none;
    color: #fff;
    font-size: 1rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Scrollozható tartalom */
.osszegzo-tartalom {
    overflow-y: auto;
    padding: 4px 16px 0;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

/* Szekció cím */
.osszegzo-szekcion-cim {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: .04em;
    margin: 12px 0 6px;
}

/* Adatsor */
.osszegzo-sor {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.osszegzo-sor:last-child {
    border-bottom: none;
}

/* Kiemelt sor (nettó) */
.osszegzo-sor--kiemelt {
    font-weight: 700;
    font-size: 0.88rem;
    padding: 6px 0;
    border-top: 1px solid var(--border);
}

/* Pontszám kör */
.osszegzo-pont-kor {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.osszegzo-pont-szam {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}

.osszegzo-pont-max {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1;
}

/* -------------------------------------------------------
   Étrend naplóba modal (egyedi + mind)
   ------------------------------------------------------- */
.naplo-modal-hatter {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 200;
}

.naplo-modal {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--card-bg);
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    z-index: 201;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.naplo-modal__fejlec {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 10px;
    border-bottom: 1px solid var(--border);
}

.naplo-modal__cim {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.naplo-modal__bezar {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    line-height: 1;
}

.naplo-modal__gombok {
    display: flex;
    gap: 8px;
    padding: 12px 16px 16px;
}

/* -------------------------------------------------------
   Nyomtatás – @media print
   ------------------------------------------------------- */
@media print {
    /* Alap oldalbeállítás */
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt;
        max-width: none !important;
    }

    /* Elrejtendő elemek */
    .bottom-nav,
    .top-bar,
    #rogzitesModal,
    .etrend-recept-gomb,
    button,
    .fulezes,
    #panel-etrend,
    #tab-etrend,
    #tab-bevasarlo {
        display: none !important;
    }

    /* Bevásárlólista nyomtatásnál látható */
    #panel-bevasarlo {
        display: block !important;
    }

    /* Accordion nyitva */
    .etrend-nap-tartalom {
        display: block !important;
    }

    /* Kártyák border nélkül */
    .kartya,
    .etrend-nap-kartya,
    .etrend-etkezes-kartya {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }

    /* Recept panel látható nyomtatásnál */
    .etrend-recept-panel {
        display: block !important;
    }

    /* Bevásárlólista checkbox nyomtathatóan */
    .bevasarlo-checkbox {
        border: 1px solid #000;
        appearance: none;
        -webkit-appearance: none;
        width: 14px;
        height: 14px;
        border-radius: 3px;
        display: inline-block;
        vertical-align: middle;
    }

    /* Beszerzett tétel áthúzva marad */
    .bevasarlo-tetel--kesz .bevasarlo-nev {
        text-decoration: line-through;
    }

    a { color: #000 !important; text-decoration: none !important; }
}

/* -------------------------------------------------------
   Accessibility – fókusz jelzők láthatósága
   ------------------------------------------------------- */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Csak egérrel kattintva nincs outline */
:focus:not(:focus-visible) {
    outline: none;
}
