:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --card-bg: #f8f9fa;
    --primary: #5662f6;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --beige-light: #e8c8b1;
    --beige-accent: #d9b99a;
    --beige-dark: #c99a2a;
}

body.dark {
    --bg-color: #121212;
    --text-color: #ffffff;
    --card-bg: #1e1e1e;
    --primary: #5662f6;
    --secondary: #adb5bd;
    --success: #20c997;
    --danger: #e83e8c;
    --beige-light: #2a2a2a;
    --beige-accent: #3a3a3a;
    --beige-dark: #4a4a4a;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--secondary);
}

.btn-primary { 
    background-color: var(--primary); 
    border-color: var(--primary); 
    color: white;
}
.btn-primary:hover { 
    background-color: #4450d0; 
    border-color: #4450d0; 
    opacity: 0.8;
}

.btn-next { 
    background-color: var(--primary); 
    border: none; 
    color: white; 
    padding: 12px 30px; 
    border-radius: 5px; 
    font-weight: bold;
    margin-top: 20px;
}
.btn-next:hover { 
    background-color: #4450d0; 
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 250px;
    background: var(--card-bg);
    padding-top: 20px;
    border-right: 1px solid var(--secondary);
}

.main-content { 
    margin-left: 250px; 
    padding: 20px; 
}

/* Toggle */
#theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
}

/* Modal a další */
.modal-content { 
    background-color: var(--card-bg); 
    color: var(--text-color); 
}
.nav-link { 
    color: var(--text-color); 
}
.nav-link.active { 
    background-color: var(--primary); 
    color: white; 
}

/* Disabled times */
option:disabled { 
    color: #999; 
    background: #f5f5f5; 
}

/* Béžové styly pro rezervace */
.beige-theme {
    --card-bg: var(--beige-light);
    --beige-light: #e8c8b1;
    --beige-accent: #d9b99a;
    --beige-dark: #c99a2a;
    --primary: #5662f6;
}

.rezervace-container {
    background-color: var(--beige-light);
    padding: 30px;
    border-radius: 15px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.calendar-container {
    float: left;
    width: 50%;
    padding-right: 20px;
    border-right: 1px solid var(--beige-accent);
}

.time-container {
    float: right;
    width: 50%;
    padding-left: 20px;
}

#datePicker, #fallbackDate {
    height: 350px;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--beige-accent);
    padding: 10px;
}

#fallbackDate {
    width: 100%;
    font-size: 18px;
    color: var(--text-color);
}

select.form-control {
    background-color: white;
    border: 1px solid var(--beige-accent);
    border-radius: 8px;
    padding: 10px;
    font-size: 16px;
}

.header-logo {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.header-logo img {
    max-height: 80px;
    margin-bottom: 10px;
}

.header-logo h2 {
    color: var(--primary);
    font-weight: bold;
    margin: 0;
}

/* Logout sekce – fix pro překrývání */
.logout-section {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 5px;
    border-radius: 5px;
    transition: background 0.3s;
}

.logout-section:hover {
    background: rgba(0,0,0,0.1);
}

.user-name, .admin-name {
    font-weight: bold;
    font-size: 14px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-name {
    color: var(--text-color);
}

.admin-name {
    color: var(--danger);
}

.logout-icon {
    font-size: 18px;
    color: var(--primary);
    text-decoration: none;
}

.footer {
    text-align: center;
    margin-top: 40px;
    color: var(--secondary);
    font-size: 0.9em;
    border-top: 1px solid var(--beige-accent);
    padding-top: 20px;
}

/* Clearfix pro floaty */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Fix pro admin nastavení button */
.settings-btn {
    position: absolute;
    top: 60px;
    right: 10px;
    z-index: 10;
}

/* CSS pro kalendář v rezervacích – hezčí vzhled */
.fc {
    font-family: Arial, sans-serif;
}

.fc-daygrid-day {
    border: 1px solid var(--beige-accent);
    padding: 5px;
    transition: background 0.3s;
}

.fc-daygrid-day:hover {
    background-color: rgba(86, 98, 246, 0.1);  /* Světle modrá hover */
}

.fc-daygrid-day.fc-day-today {
    background-color: var(--primary);  /* Modrá pro dnešek */
    color: white;
}

.fc-daygrid-day-number {
    color: var(--text-color);
    font-weight: bold;
}

.fc-button {
    display: none;  /* Skryt tlačítka pro malý kalendář */
}

.fc-toolbar {
    display: none;  /* Skryt header */
}

/* Responsivní úpravy pro mobil */
@media (max-width: 768px) {
    .calendar-container, .time-container {
        float: none;
        width: 100%;
        padding: 0;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .main-content {
        margin-left: 0;
    }
    .logout-section {
        position: static;
        margin-top: 10px;
        right: auto;
    }
    .settings-btn {
        position: static;
        margin-top: 10px;
    }
}