:root {
    --sidebar-bg: #2c3e50;
    --main-bg: #f8f9fa;
    --glass-bg: #cdcdcd2f;
    --accent: #4caf50;
    --text: #333;
    --warning: #e67e22;
    --danger: #e74c3c;
    --color-border: #e0e0e0;
    --color-primary: #00adb5;
    --font-heading: 'Host Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    display: flex;
    height: 100vh;
    background: var(--main-bg);
    color: var(--text);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

#admin-layout {
 width:100%;
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background: var(--glass-bg);
    color: rgb(0, 0, 0);
    display: flex;
    flex-direction: column;
    padding: 20px;
    backdrop-filter: blur(50px); /* Elmosás */
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border); /* Finom él */
    border-radius: 32px;
    padding: 30px 40px 60px 40px;
    box-shadow: 0 25px 50px -12px var(--color-black-10);
    text-align: center;
    margin: 20px 0 20px 20px;
}

.sidebar h2 {
    font-size: 1.4rem;
    margin-bottom: 30px;
    text-align: center;
    color: var(--accent);
    border-bottom: 1px solid #444;
    padding-bottom: 15px;
}

.nav-item {
    padding: 12px 15px;
    cursor: pointer;
    border-radius: 100px;
    margin-bottom: 8px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.nav-item:hover { background: #34495e; }
.nav-item.active { background: var(--color-primary);
    color: var(--main-bg);
}

.nav-item svg {
    color: var(--color-primary); /* Itt használjuk a kért színt */
    transition: color 0.3s ease;
}

.nav-item.active svg {
    color: var(--main-bg); /* Az ikon színe is átvált */
}

.nav-item:hover:not(.active) {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Kijelentkezés gomb egyedi stílusa */
.nav-logout {
    margin-top: auto; /* Ez tolja le a sidebar aljára */
    background-color: var(--danger); /* Piros háttér */
    color: white !important; /* Fehér szöveg */
    border-radius: 8px;
    margin-bottom: 10px;
    margin-left: 10px;
    margin-right: 10px;
    border-radius: 100px;
}

.nav-logout svg {
    color: white !important; /* Az ikon mindig fehér marad */
}

.nav-logout:hover {
    filter: brightness(1.1); /* Hoverre kicsit világosabb lesz */
    background-color: var(--danger) !important;
}

.add-btn {
    background: var(--warning);
    margin-bottom: 25px;
    justify-content: center;
    font-weight: bold;
}

/* CONTENT AREA */
.content { flex: 1; padding: 40px; overflow-y: auto; }
.page { display: none; max-width: 1100px; margin: auto; }
.page.active { display: block; }

/* FILTER PANEL */
.filter-panel {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
    align-items: flex-end;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.filter-group { display: flex; flex-direction: column; flex: 1; }
.filter-group label { font-size: 0.8rem; font-weight: bold; margin-bottom: 5px; color: #666; }

/* TABLES */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

th, td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f1f1f1; font-weight: 600; color: #555; }
tr:hover { background: #fafafa; }

/* BUTTONS */
button { cursor: pointer; padding: 8px 14px; border-radius: 100px; border: none; transition: 0.2s; font-weight: 500; }
.btn-primary { background: var(--color-primary); color: white; border: 100px;}
.btn-back { background: #95a5a6; color: white; margin-bottom: 20px; }
.btn-ghost { background: #eee; color: #555; }

/* PROGRESS BAR */
.progress-container { background: #eee; border-radius: 10px; height: 12px; width: 100%; margin: 12px 0; overflow: hidden; }
.progress-fill { background: var(--accent); height: 100%; transition: width 0.5s ease; }

/* MODAL */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 420px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.quick-info-bar {
    background: #eef2f3;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #555;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-active { background: #d4edda; color: #155724; }
.status-closed { background: #f8d7da; color: #721c24; }

.cycle-dates {
    font-size: 0.85rem;
    color: #777;
    margin: 5px 0;
}

.btn-unlock {
    background: var(--danger);
    color: white;
}
.btn-unlock:hover {
    background: var(--danger);
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.task-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-left: 5px solid var(--accent);
    transition: transform 0.2s;
}

.task-card:hover {
    transform: translateY(-3px);
}

.task-card h4 {
    margin: 0 0 10px 0;
    color: var(--primary);
}

.task-info {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 10px;
}

.stats-cards {
    display: flex;
    gap: 20px;
}

.stat-card-blue {
    background: var(--color-primary);
    color: white;
    padding: 20px;
    border-radius: 12px;
    flex: 1;
    max-width: 250px;
}

.stat-card-red {
    background: var(--danger);
    color: white;
    padding: 20px;
    border-radius: 12px;
    flex: 1;
    max-width: 250px;
}

#det-name {
    display: flex;
    align-items: center;
}

.form-group { margin-bottom: 15px; }
input, select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; box-sizing: border-box; }

.cycle-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #f0f2f5;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

#login-page{
    width:100%;
}

/* SZŰRŐ PANEL ÚJRAGONDOLVA */
.filters {
    background: white;
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap; /* Hogy mobilon is jól törjön */
    gap: 15px;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid var(--color-border);
}

.filters input, .filters select {
    border: 1px solid #eef2f3;
    background: #fcfdfe;
    padding: 10px 15px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text);
    transition: all 0.2s ease;
    min-width: 150px;
}

/* Kiemelés fókusz esetén */
.filters input:focus, .filters select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 173, 181, 0.1);
    background: white;
}

/* Külön stílus a névkeresőnek, hogy hangsúlyosabb legyen */
#search-name {
    flex: 2; /* Ez nyúlik a legnagyobbra */
    min-width: 200px;
}

/* Kor szűrő konténer */
.age-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 5px 12px;
    border-radius: 12px;
    border: 1px solid #eef2f3;
}

.age-filter-group span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
}

.age-filter-group input {
    width: 70px !important;
    min-width: 70px !important;
    border: none;
    background: transparent;
    padding: 5px;
    text-align: center;
}

/* Alaphelyzet gomb stílusa */
.btn-ghost {
    background: #f1f3f5;
    color: #495057;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-ghost:hover {
    background: #e9ecef;
    color: var(--danger);
}

.login-box h2 { margin-bottom: 10px; color: var(--primary); }
.login-box p { color: #666; margin-bottom: 30px; }

/* SEGÉD OSZTÁLYOK */
.w-100 { width: 100%; }
.mb-10 { margin-bottom: 10px; }
.mt-10 { margin-top: 10px; }
.h-50 { height: 50px; }
.bg-blue { background: #3498db; }
.flex-1 { flex: 1; }
.modal-footer { display: flex; gap: 10px; margin-top: 20px; }

/* --- RESPONSIVE DESIGN (768px alatt) --- */
@media (max-width: 768px) {
    body {
        flex-direction: column; /* Egymás alá kerül a nav és a tartalom */
        height: auto;
    }

    /* Sidebar átalakítása alsó menüsorrá */
    .sidebar {
        width: 100%;
        height: 70px;
        position: fixed;
        bottom: 0;
        left: 0;
        margin: 0;
        padding: 0 10px;
        flex-direction: row; /* Vízszintes elrendezés */
        justify-content: space-around;
        align-items: center;
        border-radius: 0;
        z-index: 9999;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        border: none;
        border-top: 1px solid var(--color-border);
    }

    /* Logo elrejtése mobilon a helytakarékosság miatt */
    .nav-brand {
        display: none;
    }

    .nav-item {
        margin-bottom: 0;
        padding: 10px;
        flex-direction: column;
        gap: 4px;
        font-size: 10px;
        border-radius: 12px;
        flex: 1;
        justify-content: center;
    }

    .nav-item span {
        display: block; /* Felirat az ikon alatt */
    }

    /* Kijelentkezés gomb mobilon */
    .nav-logout {
        margin-top: 0;
        margin: 0 5px;
        width: 36px;
        height: 36px;
        flex: 0 0 auto;
    }

    .nav-logout span {
        display: none; /* Mobilon csak az ikon látszik */
    }

    /* Tartalom igazítása */
    .content {
        padding: 20px 15px 100px 15px; /* Alul hely a menünek */
        width: 100%;
        box-sizing: border-box;
    }

    /* Statisztikai kártyák egymás alá */
    .stats-cards {
        flex-direction: column;
    }

    .stat-card-blue, .stat-card-red {
        max-width: 100%;
    }

    /* Táblázatok kezelése - ne nyomják szét a képernyőt */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Modal szélessége mobilon */
    .modal-content {
        width: 90%;
        margin: 10px;
        padding: 20px;
    }

    /* Szűrők egymás alá */
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters input, .filters select {
        width: 100% !important;
    }

    /* Ügyfél adatlap fejléce */
    #det-name {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
