:root{
    --primary: #84B179;
    --accent: #A2CB8B;
    --bg: #C7EABB;
    --text: #111111;
    --card: #ffffff;
    --border: #d7e7d0;
    --shadow: 0 10px 28px rgba(0,0,0,0.12);
    --shadow2: 0 6px 18px rgba(0,0,0,0.08);
    --danger: #b42318;
    --radius: 16px;
    --radius-sm: 12px;
    --maxw: 1100px;
    --padx: 1rem;
}

*{
    box-sizing: border-box;
}

html, body{
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body{
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* Közös szélesség */
.admin-oldal,
.admin-menu-wrapper,
h1,
.uzenet,
.foglalas-form,
.lemondas-box,
#foglalastabla,
.panel.login,
.regisztracio-doboz,
.kilepes-doboz{
    width: min(var(--maxw), calc(100% - (2 * var(--padx))));
    margin-left: auto;
    margin-right: auto;
}

/* Címek */
h1, h2{
    color: var(--primary);
    margin-top: 0;
}

h1{
    margin: 1.5rem auto 1rem auto;
    font-size: clamp(1.8rem, 2.5vw, 2.3rem);
}

h2{
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Linkek */
a{
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

a:hover{
    color: #5f9d57;
    text-decoration: underline;
}

/* ===== ADMIN MENÜ ===== */
.admin-menu-wrapper{
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.admin-navbar{
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(255,255,255,0.55);
    box-shadow: var(--shadow2);
    border-radius: 18px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.admin-navbar .menu{
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
}

.menu-bal,
.menu-jobb{
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.menu-bal a,
.menu-jobb button{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.95rem;
    transition: 0.25s ease;
}

.menu-bal a{
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text);
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.menu-bal a:hover{
    background: var(--accent);
    color: #0d2d0d;
    text-decoration: none;
    transform: translateY(-1px);
}

.menu-jobb form{
    margin: 0;
}

.menu-jobb button{
    background: var(--primary);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(132,177,121,0.35);
}

.menu-jobb button:hover{
    background: #6ea362;
    transform: translateY(-1px);
}

/* ===== BELÉPÉS / REGISZTRÁCIÓ / KILÉPÉS ===== */
.admin-oldal{
    display: flex;
    justify-content: center;
    padding: 2rem 0 3rem 0;
}

.panel.login,
.regisztracio-doboz,
.kilepes-doboz{
    width: min(520px, 100%);
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(255,255,255,0.65);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.link-sor{
    margin-top: 1rem;
    text-align: center;
}

.kozepes-szoveg{
    font-size: 1rem;
    opacity: 0.85;
    text-align: center;
}

/* ===== ŰRLAPOK ===== */
form{
    margin: 0;
}

label{
    display: inline-block;
    margin-bottom: 0.35rem;
    font-weight: 700;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
select,
textarea{
    width: 100%;
    min-height: 48px;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1rem;
}

textarea{
    min-height: 120px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus{
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(132,177,121,0.18);
}

.input{
    width: 100%;
}

/* Gombok */
input[type="submit"],
.button,
.vissza-gomb,
.lemondas-box form input[type="submit"]{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: 0.25s ease;
    box-shadow: 0 10px 18px rgba(132,177,121,0.28);
}

input[type="submit"]:hover,
.button:hover,
.vissza-gomb:hover,
.lemondas-box form input[type="submit"]:hover{
    background: #6ea362;
    transform: translateY(-1px);
    text-decoration: none;
}

.gomb-sor{
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.vissza-gomb{
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}

/* Form group */
.form-group{
    margin-bottom: 0.4rem;
}

/* ===== ÜZENET ===== */
.uzenet{
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.85);
    border-left: 5px solid var(--primary);
    box-shadow: var(--shadow2);
}

/* ===== FOGLALÁS SZERKESZTÉS / LEMONDÁS ===== */
.foglalas-form,
.lemondas-box{
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 1.6rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.lemondas-box ul{
    padding-left: 1.2rem;
    margin-bottom: 1.4rem;
}

.lemondas-box li{
    margin-bottom: 0.45rem;
}

/* ===== TÁBLA ===== */
#foglalastabla{
    display: table;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 1rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

#foglalastabla tr:first-child{
    background: var(--primary);
    color: #ffffff;
}

#foglalastabla td,
#foglalastabla th{
    border: 1px solid #e8eee4;
    padding: 0.85rem 0.75rem;
    vertical-align: top;
}

#foglalastabla tr:nth-child(even):not(:first-child){
    background: #f7fbf5;
}

#foglalastabla tr:hover:not(:first-child){
    background: #eef7e8;
}

/* Művelet linkek a táblában */
#foglalastabla a{
    display: inline-block;
    margin: 0.15rem 0.2rem;
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    background: #eef7e8;
    color: #234923;
    text-decoration: none;
}

#foglalastabla a:hover{
    background: var(--accent);
}

/* ===== MOBIL ===== */
@media (max-width: 900px){
    .admin-navbar .menu{
        flex-direction: column;
        align-items: stretch;
    }

    .menu-bal,
    .menu-jobb{
        width: 100%;
        justify-content: center;
    }

    .menu-bal a,
    .menu-jobb button{
        width: 100%;
    }

    .panel.login,
    .regisztracio-doboz,
    .kilepes-doboz,
    .foglalas-form,
    .lemondas-box{
        padding: 1.2rem;
    }

    #foglalastabla{
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .gomb-sor{
        flex-direction: column;
        align-items: stretch;
    }

    .gomb-sor input[type="submit"],
    .gomb-sor .vissza-gomb{
        width: 100%;
    }
}
/* Követelmény: hibás/kötelező mező jelzése (JS: classList.add("error")) */
.foglalas-form .error{
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 4px rgba(176,0,32,.18) !important;
}

/* Követelmény: hibaszöveg (JS: .error-text.active) */
.error-text{
  display: block;
  margin-top: .35rem;
  min-height: 1.15em;

  font-size: .92rem;
  color: var(--danger);

  visibility: hidden;
}

.error-text.active{
  visibility: visible;
}

.uzenet_siker {
    background-color: #e8f5e9;
    color: #2E7D32;
    padding: 12px;
    margin: 15px 0;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.uzenet_hiba {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px;
    margin: 15px 0;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}