* { box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; padding: 0; }
html, body { height: 100%; width: 100%; background-color: #121317; color: #f3f4f6; overflow: hidden; }

.navbar { display: flex; justify-content: space-between; align-items: center; background-color: #181920; border-bottom: 2px solid #eab308; padding: 0 25px; height: 60px; width: 100%; position: relative; z-index: 100; box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.nav-logo { font-size: 1.25rem; font-weight: 800; color: #f3f4f6; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 15px; }
.nav-logo span { color: #eab308; }
.toggle-sidebar-btn { background: #27272a; border: 1px solid #3f3f46; color: #eab308; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 1.1rem; transition: 0.2s; }
.toggle-sidebar-btn:hover { background: #3f3f46; }
.nav-right { display: flex; align-items: center; gap: 15px; }
.time-badge { background: #22232b; border: 1px solid #3f3f46; color: #eab308; padding: 6px 12px; border-radius: 6px; font-size: 0.85rem; font-weight: bold; }

.fcp-layout { display: flex; height: calc(100vh - 60px); width: 100vw; overflow: hidden; }
.sidebar { width: 280px; background-color: #181920; border-right: 1px solid #2d2f39; padding: 20px 15px; flex-shrink: 0; transition: width 0.3s ease, padding 0.3s ease; display: flex; flex-direction: column; height: 100%; }
.sidebar.collapsed { width: 75px; padding: 20px 10px; }
.sidebar-title { font-size: 0.75rem; color: #a1a1aa; text-transform: uppercase; margin: 15px 0 8px 5px; font-weight: bold; white-space: nowrap; overflow: hidden; transition: opacity 0.2s; }
.sidebar.collapsed .sidebar-title { opacity: 0; height: 0; margin: 0; }

.tab-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; background: none; border: none; color: #a1a1aa; cursor: pointer; border-radius: 6px; font-weight: 600; font-size: 0.95rem; transition: 0.2s; margin-bottom: 4px; white-space: nowrap; overflow: hidden; }
.tab-btn:hover, .tab-btn.active { background-color: #27272a; color: #eab308; border-left: 4px solid #eab308; }
.tab-btn span.icon { font-size: 1.2rem; min-width: 24px; text-align: center; }
.sidebar.collapsed .tab-btn span.text { display: none; }

.content-area { flex-grow: 1; padding: 30px; overflow-y: auto; background-color: #121317; height: 100%; }
.tab-pane { display: none; max-width: 100%; }
.tab-pane.active { display: block; }
.card { background-color: #181920; border: 1px solid #2d2f39; border-radius: 8px; padding: 25px; margin-bottom: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
h2 { color: #eab308; margin-bottom: 15px; font-size: 1.4rem; border-bottom: 1px solid #2d2f39; padding-bottom: 8px; }


.profile-grid { display: grid; grid-template-columns: 200px 1fr; row-gap: 12px; column-gap: 20px; font-size: 1.05rem; margin-top: 10px; align-items: center; }
.profile-label { color: #a1a1aa; font-weight: 600; }
.profile-val { color: #fff; font-weight: bold; }

.filter-container { display: flex; gap: 15px; align-items: center; margin-bottom: 15px; width: 100%; }
.filter-box { max-width: 350px; flex-grow: 1; margin: 0 !important; }
.filter-box input { margin: 0 !important; border-color: #eab308; background: #121317; padding: 8px 12px; }

input, select, textarea { width: 100%; padding: 10px 12px; margin: 6px 0 15px 0; background: #22232b; border: 1px solid #3f3f46; color: white; border-radius: 6px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #eab308; }

button.btn { background-color: #eab308; color: #121317; border: none; padding: 9px 16px; border-radius: 6px; cursor: pointer; font-weight: bold; transition: 0.2s; }
button.btn:hover { background-color: #ca8a04; }
button.btn-red { background-color: #ef4444; color: white; }
button.btn-red:hover { background-color: #dc2626; }
button.btn-blue { background-color: #0284c7; color: white; }
button.btn-blue:hover { background-color: #0369a1; }
button.btn-dark { background-color: #27272a; color: #f3f4f6; border: 1px solid #3f3f46; }
button.btn-dark:hover { background-color: #3f3f46; }
button.btn-small { padding: 4px 8px; font-size: 0.8rem; }

.table-responsive { overflow-x: auto; width: 100%; }
.table-responsive { 
    overflow: visible; 
}
.table { width: 100%; border-collapse: collapse; margin-top: 5px; font-size: 0.9rem; }
.table th, .table td { padding: 12px; text-align: left; border-bottom: 1px solid #2d2f39; }
.table th { background-color: #22232b; color: #eab308; cursor: pointer; user-select: none; }
.table th:hover { background-color: #2d2f39; }
.table tr:hover { background-color: #1f2029; }

.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.85); z-index: 500; justify-content: center; align-items: center; backdrop-filter: blur(4px); }
.modal-card { background: #181920; border: 1px solid #eab308; border-radius: 8px; padding: 30px; width: 480px; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.8); max-height: 90vh; overflow-y: auto; }

.badge { padding: 3px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; display: inline-block; }
.badge-gold { background: #eab308; color: #121317; }
.badge-red { background: #ef4444; color: white; }
.badge-blue { background: #0284c7; color: white; cursor: help; }
.badge-gray { background: #3f3f46; color: white; }
.alert { padding: 12px; border-radius: 6px; margin-bottom: 15px; font-weight: bold; }
.alert-error { background-color: #7f1d1d; color: #fecaca; border: 1px solid #991b1b; }
.alert-success { background-color: #14532d; color: #bbf7d0; border: 1px solid #166534; }
.pay-btn { width: 28px; height: 28px; border-radius: 4px; border: 1px solid #3f3f46; background: #22232b; color: #71717a; font-weight: bold; cursor: pointer; }
.pay-btn.paid { background: #22c55e; color: #121317; border-color: #16a34a; }
.info-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}


.info-tooltip:hover .tooltip-card {
    visibility: visible !important;
    opacity: 1 !important;
    bottom: 125% !important;
    z-index: 99999 !important;
}

.info-tooltip .tooltip-card {
    visibility: hidden;
    width: 240px;
    background-color: #1b1f27 !important; 
    color: #f3f4f6 !important; 
    text-align: left;
    border: 1px solid #0284c7 !important;
    border-radius: 6px;
    padding: 12px;
    position: absolute;
    z-index: 9999;
    bottom: 140%;
    left: 50%;
    margin-left: -120px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out, bottom 0.2s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8);
    font-weight: normal;
    font-size: 0.85rem;
    line-height: 1.5;
    pointer-events: none;
}


.info-tooltip .tooltip-card::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #1b1f27 transparent transparent transparent;
}


.info-tooltip .tooltip-card::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -7px;
    border-width: 7px;
    border-style: solid;
    border-color: #0284c7 transparent transparent transparent;
    z-index: -1;
}

@media screen and (max-width: 768px) {
    html, body { overflow: auto; height: auto; }
    
    /* 1. Fejléc reszponzív igazítása */
    .navbar { 
        padding: 10px 15px; 
        height: auto; 
        min-height: 60px; 
        flex-wrap: wrap; 
        gap: 10px; 
    }
    .toggle-sidebar-btn { display: none !important; } /* Nem kell, mert alapból nyitva van */
    .time-badge { font-size: 0.75rem; width: 100%; text-align: center; order: 3; margin-top: 5px; }

    /* 2. SIDEBAR -> FENTI KINYITOTT BLOKK */
    .fcp-layout { 
        flex-direction: column; 
        height: auto; 
        overflow: visible; 
    }
    .sidebar { 
        position: static !important; /* Nem lebeg, normálisan beilleszkedik a fenti részre */
        width: 100% !important; 
        height: auto !important; 
        padding: 15px; 
        background: #181920; 
        border-right: none; 
        border-bottom: 2px solid #eab308; 
        box-shadow: 0 4px 15px rgba(0,0,0,0.4);
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    .sidebar.collapsed { width: 100% !important; }
    
    /* Kategória címek (Általános, Leader) kiemelése mobilon */
    .sidebar-title { 
        display: block !important; 
        opacity: 1 !important; 
        height: auto !important; 
        margin: 12px 0 4px 0; 
        font-size: 0.8rem; 
        color: #eab308; 
        border-bottom: 1px solid #2d2f39; 
        padding-bottom: 4px; 
    }
    
    /* Menügombok átalakítása széles, jól nyomható "kártyákká" */
    .tab-btn { 
        display: flex !important; 
        flex-direction: row; 
        align-items: center; 
        justify-content: flex-start;
        width: 100%; 
        padding: 10px 14px; 
        font-size: 0.95rem; 
        margin-bottom: 0;
        background: #22232b; /* Kis háttér, hogy elkülönüljön */
        border: 1px solid #2d2f39;
        border-radius: 6px;
    }
    .tab-btn span.icon { font-size: 1.2rem; margin-right: 12px; }
    .tab-btn span.text { display: inline !important; } /* A szöveg KÖTELEZŐEN látszik */
    
    /* Az aktív gomb egyértelmű jelölése */
    .tab-btn.active { 
        background-color: #27272a; 
        color: #eab308; 
        border-left: 4px solid #eab308; 
        border-color: #eab308;
    }

    /* 3. Tartalmi rész (pontosan a fenti menü alatt folytatódik) */
    .content-area { 
        padding: 15px; 
        height: auto; 
        overflow: visible; 
        width: 100%;
    }
    
    /* 4. Kártyák és Adatlap mobilra */
    .card { padding: 15px; margin-bottom: 15px; }
    .profile-grid { grid-template-columns: 1fr; gap: 6px; }
    .profile-val { margin-bottom: 10px; font-size: 1rem; }
    
    /* 5. Táblázatok: nem nyomják szét a képernyőt, oldalra húzhatók */
    .table-responsive { 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch; 
        margin-bottom: 10px;
        border-radius: 6px;
        border: 1px solid #2d2f39;
    }
    .table { font-size: 0.85rem; margin-top: 0; }
    .table th, .table td { padding: 10px 8px; white-space: nowrap; }
    
    /* Ujjhoz igazított fizetés gombok */
    .pay-btn { width: 32px; height: 32px; font-size: 0.9rem; }
    
    /* Modálok teljes képernyőre */
    .modal-card { width: 95%; max-height: 85vh; padding: 20px; }
}