/* BODY & GENERAL */
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    display: flex;
    flex-direction: column; /* h1 on top */
    gap: 20px;
    background-color: #f5f5f5; /* page background */
}

/* Header */
h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
}

/* Container for image + menu */
#container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 30px;
}

/* Left column (image) */
#left {
    flex: 0 0 400px;
    background-color: #fff; 
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#left img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

/* Right column (menu/forms) */
#right {
    flex: 1 1 auto;
    min-width: 300px;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Forms and headings inside right */
#right form, #right h2, #right a {
    margin-bottom: 15px;
}

/* Buttons */
#right button {
    margin: 3px 0;
    padding: 6px 12px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
}

#right button:hover {
    background-color: #45a049;
}

/* Links */
#right a {
    color: #007BFF;
    text-decoration: none;
}

#right a:hover {
    text-decoration: underline;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

table th, table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
}

table tr:nth-child(even) {
    background-color: #f2f2f2;
}

table tr:hover {
    background-color: #e0f7fa;
}

/* Responsive tables */
@media (max-width: 900px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }
    thead tr {
        display: none;
    }
    tr {
        margin-bottom: 15px;
        border-bottom: 2px solid #ddd;
    }
    td {
        padding-left: 50%;
        position: relative;
        text-align: left;
    }
    td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
        color: #333;
    }
}

/* Responsive: stack vertically on small screens */
@media (max-width: 900px) {
    #container {
        flex-direction: column;
    }
    #left, #right {
        width: 100%;
        flex: none;
    }
    #left img {
        max-width: 90%;
        margin: 0 auto 20px auto;
        display: block;
    }
}

/* ---------------- MOBILE OPTIMIZATION ---------------- */
@media (max-width: 768px) {

    body {
        margin: 10px;
        font-size: 18px; /* bigger base text */
    }

    h1 {
        font-size: 24px;
    }

    #container {
        flex-direction: column;
        gap: 15px;
    }

    #left, #right {
        width: 100%;
        padding: 15px;
    }

    #left img {
        width: 100%;
        max-width: 100%;
        border-radius: 8px;
    }

    /* Make forms comfortable */
    textarea, input[type="text"], input[type="datetime-local"] {
        width: 100%;
        font-size: 16px;
        padding: 10px;
        margin-bottom: 10px;
        border-radius: 6px;
        border: 1px solid #ccc;
    }

    /* BIG touch-friendly buttons */
    #right button {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        margin: 6px 0;
        border-radius: 6px;
    }

    /* Checkboxes spacing */
    input[type="checkbox"] {
        transform: scale(1.3);
        margin-right: 8px;
    }

    /* Links easier to tap */
    #right a {
        display: block;
        padding: 10px 0;
        font-size: 16px;
    }

    /* Improve table readability */
    td {
        padding: 12px 10px;
    }
}