/* =================================================================
   STYLY POUZE PRO ADMIN STRÁNKU (admin/style.css)
   ================================================================= */

/* --- Obal --- */
/* Použije .admin-container místo .container nebo .rezervace-container */
.admin-container {
    margin: 2rem 1em;
    padding: 1.5rem 2rem;
    /* Tmavě fialové pozadí, jako na screenshotu */
    background: #3a1a3c; 
    border: 1px solid #5a2a5c;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    color: #f0f0f0;
}

.admin-container h1 {
    text-align: left;
    color: #ffffff;
    border-bottom: 1px solid #5a2a5c;
    padding-bottom: 15px;
    margin-top: 0;
}

/* --- Přihlašovací formulář --- */
.login-form {
    text-align: center;
    margin-top: 50px;
    background: #3a1a3c;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #5a2a5c;
}
.login-form label {
    font-size: 1.2em;
    color: #f0f0f0;
    margin-right: 10px;
}
.login-form input[type="password"] {
    padding: 10px;
    border: 1px solid #5a2a5c;
    background: #2a0a2c;
    color: #f0f0f0;
    border-radius: 4px;
    font-size: 1em;
}
.login-form button {
    padding: 10px 15px;
    background: #e0e0e0;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    margin-left: 10px;
}

/* Tlačítko odhlásit */
.logout-form {
    text-align: right;
    margin-bottom: 20px;
}
.logout-form button {
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
.logout-form button:hover {
    background: #cccccc;
}

/* --- Filtry --- */
.admin-filter {
    margin-bottom: 20px;
    text-align: left;
    display: flex;
    flex-wrap: wrap;
}
.admin-filter a {
    color: #f0f0f0;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    margin-right: 5px;
    font-size: 0.9em;
    background: #3a1a3c;
    border: 1px solid #5a2a5c;
    transition: all 0.2s ease;
}
.admin-filter a:hover {
    background: #5a2a5c;
}
.admin-filter a.active {
    background: #e0e0e0; /* Světlé pozadí pro aktivní filtr */
    color: #2a0a2c;
    font-weight: bold;
}


/* --- Tabulka (podle screenshotu) --- */
.table-wrapper {
    overflow-x: auto; /* Pro mobily */
}
table {
    width: 100%;
    border-collapse: collapse; /* Žádné dvojité čáry */
    margin-top: 20px;
    color: #f0f0f0;
    border: 1px solid #5a2a5c;
    border-radius: 4px;
    overflow: hidden; /* Pro zakulacené rohy */
}
th, td {
    padding: 12px 15px;
    text-align: left;
    /* Tenká čára mezi řádky */
    border-bottom: 1px solid #5a2a5c; 
    font-size: 0.9em;
    vertical-align: middle;
}
th {
    font-weight: bold;
    color: #ffffff;
    background-color: #3a1a3c; /* Lehce odlišená hlavička */
}
tr {
    background-color: #2a0a2c; /* Tmavé pozadí řádků */
}
tr:hover {
    background-color: #3a1a3c; /* Ztmavení při najetí */
}
td.actions {
    min-width: 150px; /* Aby se tlačítka nezalamovala */
}

/* --- Tlačítka akcí (podle screenshotu) --- */
.actions .form-inline {
    display: inline-block;
    margin: 0 2px;
}
.actions .btn-action {
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85em;
    transition: all 0.2s ease;
}
.actions .btn-action:hover {
    background: #cccccc;
}

/* --- Stavy (podle screenshotu) --- */
.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9em;
    color: #000; /* Výchozí černý text */
    text-align: center;
    display: inline-block;
    min-width: 120px;
}
.status-pending {
    background-color: #f0ad4e; /* Oranžová */
}
.status-confirmed {
    background-color: #28a745; /* Zelená */
    color: #fff;
}
.status-cancelled {
    background-color: #dc3545; /* Červená */
    color: #fff;
}
.status-cancelled_by_user {
    background-color: #007bff; /* Modrá */
    color: #fff;
}

/* --- Hlášky --- */
.message {
    padding: 12px;
    background: #e0f7fa;
    border: 1px solid #007bff;
    color: #333; /* Hlášky budou světlé */
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

/* =================================================================
   DOPLNĚNÍ PRO VYHLEDÁVÁNÍ (přidat do admin/style.css)
   ================================================================= */

.search-form {
    margin-bottom: 20px;
    display: flex;
    width: 100%;
}

.search-form input[type="text"] {
    flex-grow: 1; /* Zabere co nejvíc místa */
    padding: 10px;
    border: 1px solid #5a2a5c;
    background: #2a0a2c;
    color: #f0f0f0;
    border-radius: 4px;
    font-size: 1em;
}

.search-form button,
.search-form .cancel-search {
    padding: 10px 15px;
    background: #e0e0e0;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    margin-left: 10px;
    text-decoration: none;
    line-height: 1.5; /* Zarovnání s tlačítkem */
}

.search-form .cancel-search {
    background: #dc3545; /* Červené tlačítko pro zrušení */
    color: #fff;
}/* =================================================================
   STYLY PRO MODÁLNÍ OKNO (přidat do admin/style.css)
   ================================================================= */

.modal-overlay {
    position: fixed; /* Zůstane na místě i při skrolování */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000; /* Bude nahoře nade vším */
    
    /* Pozadí - tmavé, poloprůhledné */
    background: rgba(0, 0, 0, 0.7); 
    
    /* Vycentrování obsahu (modálu) */
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #3a1a3c; /* Fialové pozadí, jako admin */
    color: #f0f0f0;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #5a2a5c;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    width: 90%;
    max-width: 500px;
}

.modal-content h3 {
    margin-top: 0;
    color: #ffffff;
    border-bottom: 1px solid #5a2a5c;
    padding-bottom: 10px;
}

#modalDetails p {
    margin: 10px 0;
    line-height: 1.6;
}
#modalDetails strong {
    color: #ffffff;
    min-width: 80px;
    display: inline-block;
}

.modal-actions {
    margin-top: 2rem;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 15px; /* Mezera mezi tlačítky */
}

/* Použijeme stejné třídy, jaké už máme */
.modal-actions .btn-action {
    padding: 10px 20px;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Obyčejné "Zrušit" tlačítko */
.modal-actions #modalBtnCancel {
    background: #e0e0e0;
    color: #333;
}
.modal-actions #modalBtnCancel:hover {
    background: #cccccc;
}

/* Barevná tlačítka pro potvrzení */
.modal-actions .btn-confirm {
    background: #28a745; color: white;
}
.modal-actions .btn-cancel {
    background: #dc3545; color: white;
}
.modal-actions .btn-pending {
    background: #ffc107; color: black;
}

 .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Užší sloupce */
        gap: 10px; /* Menší mezery mezi kartami */
        margin-bottom: 20px;
        margin-top: 10px;
    }

    .stat-card {
        background: transparent; /* Žádné bílé pozadí */
        padding: 8px 12px; /* Malý padding */
        border-radius: 4px;
        border: 1px solid rgb(255, 0, 0); /* Velmi jemný rámeček */
        border-left-width: 4px; /* Barevný indikátor zůstává */
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-decoration: none;
        transition: background 0.2s;
    }

    .stat-card:hover {
        background: rgba(0,0,0,0.03); /* Jemné ztmavnutí při najetí */
    }

    .stat-card h3 {
        margin: 0;
        font-size: 11px; /* Malý nadpis */
        text-transform: uppercase;
        color: #777;
        letter-spacing: 0.5px;
        font-weight: 600;
    }

    .stat-card .number {
        font-size: 20px; /* Menší číslo (bylo 28px) */
        font-weight: 700;
        color: #ffffff;
        margin: 2px 0; /* Stažené mezery */
        line-height: 1.2;
    }

    .stat-card .number small {
        font-size: 11px;
        font-weight: normal;
        color: #ffffff;
        margin-left: 2px;
    }

    .stat-card .desc {
        font-size: 11px; /* Malý popis */
        color: #ffffff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Barvy proužků */
    .card-pending { border-left-color: #f39c12; }
    .card-action { border-left-color: #3498db; }
    .card-success { border-left-color: #27ae60; }
    .card-danger { border-left-color: #e74c3c; }
    
    @media (max-width: 600px) {
        .stats-grid { grid-template-columns: 1fr 1fr; } /* Na mobilu 2 vedle sebe */
    }

    /* --- Horní posuvník --- */
.top-scrollbar-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden; /* Skryje vertikální lištu */
    height: 20px; /* Výška pro standardní scrollbar */
    margin-bottom: 0; /* Nalepení na tabulku */
    border: 1px solid #5a2a5c; /* Volitelné: aby ladil s borderem tabulky */
    border-bottom: none; /* Aby nebyla dvojitá čára */
    background-color: #3a1a3c;
}

.top-scrollbar-content {
    height: 1px; /* Obsah nepotřebuje výšku, jen šířku (tu nastaví JS) */
}

/* Úprava existujícího wrapperu, aby šly hezky k sobě */
.table-wrapper {
    border-top: none; /* Odstraníme horní border, pokud ho má horní lišta */
}