/* Base Styles */
html {
    box-sizing: border-box;
    font-size: 16px;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f4f4f4;
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 200px;
    background: #333;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    padding-top: 20px;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin: 0;
    padding: 0;
}

.sidebar ul li a {
    color: #fff;
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.sidebar ul li a:hover {
    background: #575757;
}

/* Content Area Styles */
.content {
    margin-left: 210px;
    padding: 20px;
    flex: 1;
    transition: margin-left 0.3s ease;
    width: calc(100% - 210px);
}

h1 {
    color: #333;
    margin-top: 0;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

th {
    background: #eee;
}

/* Chart Container */
.chart-container {
    width: 100%;
    max-width: 700px;
    margin: 20px auto;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    background-color: #333;
    color: white;
    border: none;
    font-size: 1rem;
    padding: 12px 15px;
    width: 100%;
    cursor: pointer;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
}

.menu-toggle::after {
    content: "☰";
    font-size: 1.5rem;
}

.menu-toggle.open::after {
    content: "×";
}

/* Image Responsiveness */
img {
    max-width: 100%;
    height: auto;
}

/* Form Elements */
input, select, textarea, button {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

button:hover {
    background-color: #45a049;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .sidebar.open {
        max-height: 500px;
    }

    .content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }

    .menu-toggle {
        display: flex;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}

@media (min-width: 768px) {
    input, select, textarea {
        width: auto;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .content {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .sidebar ul li a {
        padding: 10px 12px;
    }
}
