/* Global Reset (Safe Reset) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Layout Rules */
body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    display: flex;
    flex-direction: column; /* Stack header, main, and footer */
    min-height: 100vh;
}

/* Header and Footer */
header, footer {
    display: block;
    width: 100%;
    text-align: center;
    background-color: #343a40;
    color: white;
    padding: 10px 20px;
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    width: 100%;
    text-align: center;
}

/* Containers */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Buttons and Inputs */
input, button {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    font-size: 16px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

.progress {
    height: 20px;
}

.accordion-button {
    font-size: 1.2rem;
    font-weight: bold;
}

.accordion-body p {
    margin-bottom: 8px;
}

.progress-bar {
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    color: white;
}

/* Floating To-Do Panel */
/* Floating To-Do Panel */
.todo-panel {
    position: fixed;
    right: -80%; /* Default: 80% width off-screen */
    top: 0;
    width: 80%; /* Adjust width for mobile */
    max-width: 400px; /* Limit maximum width */
    height: 100%;
    background-color: #f8f9fa;
    border-left: 1px solid #ddd;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    z-index: 1050;
}

.todo-panel.active {
    right: 0;
}

.todo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0.75rem 1rem; /* Adjust spacing */
}

.todo-content {
    padding: 10px;
    overflow-y: auto; /* Allow scrolling for long lists */
}

.todo-footer {
    border-top: 1px solid #ddd;
    padding: 10px;
}

/* Toggle Button - Responsive */
.todo-toggle {
    position: fixed;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px 0 0 5px;
    z-index: 1051;
    cursor: pointer;
    width: 35px; /* Small and discrete for mobile */
    height: 20vh;
    text-align: center;
    transition: all 0.3s ease;
}

.todo-toggle:hover {
    background-color: #0056b3;
}

.todo-toggle span {
    font-size: 20px; /* Larger font size for better readability */
    transition: transform 0.3s ease;
    display: inline-block;
    line-height: 80px; /* Center arrow vertically */
    text-align: center;
    width: 100%; /* Ensure proper centering */
}

.todo-toggle.active span {
    transform: rotate(180deg);
}

.todo-panel.active + .todo-toggle {
    right: -40px; /* Aligns with the panel when active */
}
.todo-header button {
    font-size: 1.2rem;
    color: #333;
    background: transparent;
    border: none;
    cursor: pointer;
}

.todo-header button:hover {
    color: red;
}
#closePanelBtn {
    transition: background-color 0.2s ease, transform 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#closePanelBtn:hover {
    background-color: #f8d7da; /* Light red hover effect */
    transform: scale(1.1); /* Slightly enlarges the button */
}

/* Adjust the panel and button for smaller screens */
@media (max-width: 768px) {
    .todo-panel {
        width: 100%; /* Full screen on smaller devices */
        right: -100%;
    }

    .todo-panel.active {
        right: 0; /* Slide in fully */
    }

    .todo-toggle {
        right: 0;
        top: 20%;
        height: 45px;
        width: 30px;
    }

    .todo-header, .todo-footer {
        font-size: 0.9rem;
    }
    chart-container {
        width: 100%; /* Ensure the chart fits the screen width */
        overflow-x: auto; /* Scrollable if needed */
        margin: 0 auto;
    }

    canvas {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 576px) {
    input, button {
        max-width: 100%;
        font-size: 14px;
    }
}


