@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:wght@400;600;700&display=swap');

/* --- CSS VÁLTOZÓK (Minimalista, Finomított színek) --- */
:root {
    --primary-dark: #026634;  
    --primary-accent: #92c01f;  
    --primary-hover: #3da435;   
    --bg-main: #f8f9fa;         /* Tisztább, semlegesebb világos háttér */
    --bg-panel: #ffffff;        /* A kártyák mostantól teljesen fehérek */
    --border-color: #e2e8f0;    /* Nagyon finom, szürke keret */
    --text-main: #2d3748;       /* Sötétszürke szöveg a jobb olvashatóságért */
    --text-muted: #718096;
    
    --danger-dark: #c53030;
    --danger-hover: #9b2c2c;
    
    --radius-sm: 6px;
    --radius-md: 12px;          /* Finomabb, modernebb lekerekítés */
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* --- ALAPBEÁLLÍTÁSOK ÉS TIPOGRÁFIA --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    font-family: 'Titillium Web', 'Trebuchet MS', Arial, sans-serif; 
    background-color: var(--bg-main); 
    color: var(--text-main); 
    line-height: 1.6;
    -webkit-font-smoothing: antialiased; /* Szebb betűk renderelése */
}

/* --- MINIMALISTA LOADING ANIMÁCIÓ --- */
.page-loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease 0.5s forwards; /* Fél másodperc után eltűnik */
    pointer-events: none;
}
.spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(2, 102, 52, 0.2);
    border-top-color: var(--primary-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }

/* --- FEJLÉC ÉS MENÜ --- */
header { 
    background: var(--primary-dark); 
    color: #ffffff; 
    padding: 15px 30px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); 
    margin-bottom: 30px;
}

header h1 { font-size: 20px; font-weight: 700; margin: 0; letter-spacing: 0.5px; color: #ffffff; }
nav { display: flex; align-items: center; gap: 5px; }

.nav-link, .dropbtn { 
    color: #ffffff; 
    text-decoration: none; 
    font-weight: 600; 
    padding: 8px 16px; 
    border-radius: var(--radius-sm); 
    transition: all 0.2s ease; 
    background: transparent;
    border: none;
    font-size: 15px;
    cursor: pointer;
}

.nav-link:hover, .dropbtn:hover { 
    background-color: var(--primary-accent); 
    color: var(--primary-dark); 
}

.btn-logout-header { 
    color: #ffffff; 
    text-decoration: none; 
    margin-left: 15px; 
    padding: 6px 16px; 
    border-radius: var(--radius-sm); 
    border: 1px solid rgba(255, 255, 255, 0.3); 
    font-size: 14px; 
    font-weight: 600; 
    transition: all 0.2s; 
}
.btn-logout-header:hover { 
    background: var(--danger-dark); color: white; border-color: var(--danger-dark);
}

/* --- ANIMÁLT DROPDOWN --- */
.dropdown { position: relative; display: inline-block; }
.dropdown-content { 
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px); 
    position: absolute; 
    background-color: #ffffff; 
    min-width: 220px; 
    box-shadow: var(--shadow-soft); 
    z-index: 1000; 
    border-radius: var(--radius-md); 
    top: 100%; right: 0;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); 
    padding: 8px 0;
}
.dropdown:hover .dropdown-content { 
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}
.dropdown-content a { 
    color: var(--text-main); 
    padding: 10px 20px; 
    text-decoration: none; 
    display: block; 
    font-size: 14px;
    transition: 0.2s;
}
.dropdown-content a:hover { 
    background-color: rgba(2, 102, 52, 0.05); 
    color: var(--primary-dark);
    padding-left: 24px; 
}

/* --- ELRENDEZÉS ÉS KÁRTYÁK --- */
.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

.card { 
    background: var(--bg-panel); 
    padding: 25px; 
    border-radius: var(--radius-md); 
    box-shadow: var(--shadow-soft); 
    border: 1px solid var(--border-color); 
    margin-bottom: 25px;
}

h2, h3 { 
    color: var(--primary-dark); 
    margin-bottom: 15px; 
}
h2 { font-size: 22px; }
h3 { font-size: 18px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }

/* --- ŰRLAPOK (Minimalista Inputok) --- */
input[type="text"], input[type="password"], input[type="email"], input[type="number"], select, textarea { 
    width: 100%; 
    padding: 12px 15px; 
    border-radius: var(--radius-sm); 
    border: 1px solid var(--border-color); 
    background: #fdfdfd; 
    font-family: inherit; 
    font-size: 14px;
    color: var(--text-main);
    transition: all 0.2s;
    margin-bottom: 15px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(146, 192, 31, 0.15); 
    background: #fff;
}
label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }

/* --- GOMBOK --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: var(--radius-sm); cursor: pointer;
    font-weight: 600; font-family: inherit; font-size: 14px; text-decoration: none;
    border: none; transition: all 0.2s;
}
.btn-primary { background: var(--primary-dark); color: white; }
.btn-primary:hover { background: #014d26; transform: translateY(-1px); box-shadow: var(--shadow-soft); }

.btn-secondary { background: #edf2f7; color: var(--text-main); border: 1px solid #cbd5e0; }
.btn-secondary:hover { background: #e2e8f0; color: var(--primary-dark); }

.btn-danger { background: #fff5f5; color: var(--danger-dark); border: 1px solid #fed7d7; }
.btn-danger:hover { background: var(--danger-dark); color: white; }

/* --- TÁBLÁZATOK (Letisztult, Vonalas Dizájn) --- */
.table-container { overflow-x: auto; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
th { 
    background: #f8fafc; 
    color: var(--text-muted); 
    padding: 15px; 
    font-weight: 600; 
    text-transform: uppercase; 
    font-size: 12px; 
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}
td { padding: 15px; border-bottom: 1px solid var(--border-color); color: var(--text-main); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background-color: #f7fafc; }

/* --- ÉRTESÍTÉSEK --- */
.alert { padding: 15px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.alert-success { background-color: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger { background-color: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* --- MODAL (Felugró ablak letisztítva) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(3px);
    z-index: 9999; display: none;
    align-items: center; justify-content: center;
}
.modal-content {
    background: white; width: 400px; max-width: 90%;
    padding: 30px; border-radius: var(--radius-md); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: none;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* --- EGYÉB HASZNOS --- */
.text-center { text-align: center; }
.edit-icon-button { background: none; border: none; cursor: pointer; padding: 5px; color: var(--text-muted); transition: 0.2s; }
.edit-icon-button:hover { color: var(--primary-accent); transform: scale(1.1); }