/* ================= GLOBAL ================= */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f3f3;
    color: #333;
}

/* ================= LOGIN ================= */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #e5e5e5;
}

.login-box {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 300px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.login-box input {
    width: 100%;
    padding: 10px;
    margin: 12px 0;
    border-radius: 6px;
    border: 1px solid #aaa;
    font-size: 16px;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #2e7dff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.login-box button:hover {
    background: #1d5fd8;
}

/* ================= SIDEBAR ================= */
.menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
}

.sidebar {
    width: 200px;
    background: #2d2d2d;
    color: white;
    position: fixed;
    top: 0;
    bottom: 0;
    padding: 20px;
    z-index: 100;
}

.sidebar h3 {
    margin-top: 0;
}

.sidebar a {
    color: white;
    display: block;
    margin: 14px 0;
    text-decoration: none;
}

.sidebar a:hover {
    text-decoration: underline;
}

/* ================= CONTENT ================= */
.content {
    margin-left: 230px;
    padding: 20px;
}

h1 {
    margin-top: 0;
}

/* ================= GRID ================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    max-width: 620px;
}

/* ================= CHART ================= */
canvas {
    width: 100% !important;
    height: 260px !important;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {

    .menu-icon {
        display: block;
        position: fixed;
        top: 12px;
        left: 12px;
        font-size: 28px;
        background: #2d2d2d;
        color: white;
        padding: 6px 10px;
        border-radius: 6px;
        z-index: 3000;
        cursor: pointer;
    }

	.sidebar {
    position: fixed;          /* ← KRITICKÉ */
    top: 0;                   /* ← KRITICKÉ */
    left: 0;
    width: 220px;
    height: 100vh;
    padding-top: 60px;
    background: #2d2d2d;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 3000;
}

/* otevření menu */
#menu-toggle:checked ~ .sidebar {
    transform: translateX(0);
}


    .content {
        margin-left: 0;
        padding: 16px;
        padding-top: 60px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    canvas {
        height: 320px !important;
    }
}

/* ================= OVERLAY ================= */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 2000;
}

#menu-toggle:checked ~ .overlay {
    opacity: 1;
    pointer-events: auto;
}


@media (max-width: 768px) {

    .overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 2000;
    }

    #menu-toggle:checked ~ .overlay {
        opacity: 1;
        pointer-events: auto;
    }
}
