/* ===== Sidebar Styles ===== */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 10px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(0);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
}

/* ซ่อน Sidebar */
.sidebar-hidden .sidebar {
    transform: translateX(100%);
}

/* ===== Logo ===== */
.logo-container {
    margin-bottom: 20px;
}

.logo {
    max-width: 160px;
    height: auto;
}

/* ===== Status ===== */
.status-container {
    text-align: center;
    margin-bottom: 25px;
}

.status-green {
    color: #4caf50;
    font-weight: 700;
}

.status-red {
    color: #f44336;
    font-weight: 700;
}

/* ===== Navigation ===== */
.nav-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-link {
    text-decoration: none;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

/* ===== Toggle Button ===== */
.toggle-btn {
    position: fixed;
    top: 20px;
    right: 270px; /* ให้พอดีกับ sidebar */
    background-color: #1a1a1a;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1100;
    transition: right 0.3s ease-in-out, transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.toggle-btn:hover {
    background-color: #333;
    transform: scale(1.1);
}

/* เมื่อ Sidebar ปิด */
.sidebar-hidden .toggle-btn {
    right: 15px;
}

/* ===== Responsive (มือถือ / Tablet) ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 220px;
        padding: 20px 8px;
    }

    .toggle-btn {
        right: 230px;
        font-size: 18px;
        padding: 8px 12px;
    }

    .sidebar-hidden .toggle-btn {
        right: 10px;
    }

    .nav-link {
        font-size: 15px;
        padding: 8px;
    }
}
