/* --- Global Styles & Typography --- */
body { 
    font-family: 'Times New Roman', serif; 
    margin: 0; 
    padding: 2em; 
    background-color: #F8F8F8; 
    color: #333; 
    line-height: 1.6;
}

/* --- Container & Layout --- */
.container { 
    max-width: 1300px; 
    margin: auto; 
    padding: 30px; 
    background-color: #FFFFFF; 
    border: 2px solid #333; /* Thick border */
    box-shadow: 6px 6px 0 #AAA; /* Block shadow */
    border-radius: 0; /* Sharp corners */
}

/* Headings */
h1 { 
    color: #C0392B; /* Red/Maroon primary color */
    font-weight: bold; 
    text-transform: uppercase; 
    text-align: center; 
    border-bottom: 5px double #000; /* Heavy separator */
    padding-bottom: 15px; 
    margin-bottom: 30px; 
    font-size: 2.2em;
}
h2 { 
    color: #005A9C; /* Blue secondary color */
    font-weight: bold; 
    border-bottom: 2px solid #999; 
    padding-bottom: 5px; 
    margin-top: 25px; 
    margin-bottom: 15px;
}
h3 {
    color: #333; 
    font-size: 1.1em; 
    margin-top: 20px;
}

/* --- Tab Menu Styling --- */
.tab-menu { 
    display: flex; 
    border-bottom: 2px solid #333; 
    margin-bottom: 20px; 
    background-color: #E8E8E8;
    padding-top: 5px;
}
.tab-menu button { 
    padding: 8px 15px; 
    border: 1px solid #333; 
    border-bottom: none;
    background: #F0F0F0; 
    cursor: pointer; 
    font-weight: bold; 
    margin-right: -1px; /* Overlap borders */
    border-radius: 0;
    box-shadow: none;
    transition: background-color 0.15s;
}
.tab-menu button.active { 
    background: #005A9C; 
    color: white; 
    border: 2px solid #000;
    border-bottom: 2px solid #fff; /* White space to hide container border */
    margin-bottom: -2px; /* Pull active tab forward */
    position: relative;
    z-index: 1;
}
.tab-content { padding: 15px 0; }

/* --- Grid Layout Structure --- */
.grid-3-col {
    display: grid;
    grid-template-columns: 1fr 2fr; /* Form (1) and Table (2) by default */
    gap: 30px;
}

/* Reports tab uses a 1fr 1fr grid */
#reports-tab .grid-3-col {
    grid-template-columns: 1fr 1fr; 
}

/* --- Form & Input Styles --- */
form { 
    margin-bottom: 20px; 
    padding: 15px; 
    border: 1px solid #E0E0E0; 
    background-color: #F8F8F8; 
}
input[type="text"], 
input[type="datetime-local"], 
input[type="number"], 
select, 
textarea { 
    padding: 8px; 
    margin-right: 10px; 
    border: 1px solid #555; 
    border-radius: 0; 
    width: 100%; 
    margin-bottom: 10px;
    box-sizing: border-box;
    display: block;
}
textarea { width: 100%; }

button[type="submit"], #reports-tab button { 
    background-color: #005A9C; 
    color: white; 
    padding: 10px 15px; 
    border: 2px solid #000; 
    border-radius: 0; 
    cursor: pointer; 
    margin-top: 5px; 
    box-shadow: 2px 2px 0 #000; /* Block shadow for button */
    font-weight: bold;
}
button[type="submit"]:hover, #reports-tab button:hover { 
    background-color: #003366; 
    box-shadow: 1px 1px 0 #000; 
}

/* Edit message */
.edit-message {
    margin-top: 10px;
    padding: 10px;
    background-color: #ffc107;
    border: 1px solid #ff9800;
    font-weight: bold;
    display: none;
}

/* --- Table Styles --- */
table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 15px; 
    border: 1px solid #333; 
}
th, td { 
    padding: 10px; 
    text-align: left; 
    border: 1px solid #CCC; 
    font-size: 0.9em; 
    border-collapse: collapse;
}
th { 
    background-color: #333; 
    color: white; 
    text-transform: uppercase; 
}
/* Table rows - subtle hover effect for professionalism */
tbody tr:hover {
    background-color: #f0f0f0;
}

/* --- Status & Action Buttons --- */
.status-Upcoming { color: #005A9C; font-weight: bold; }
.status-Active { color: #28a745; font-weight: bold; }
.status-Completed, .status-Inactive { color: #6c757d; }
.status-Cancelled { color: #C0392B; font-weight: bold; }

.action-btn { 
    margin: 2px; 
    padding: 5px 8px; 
    font-size: 0.8em; 
    border: 1px solid #000;
    border-radius: 0;
    box-shadow: 1px 1px 0 #000;
    cursor: pointer; 
    font-weight: bold;
    transition: box-shadow 0.1s, transform 0.1s;
}
.action-btn.edit { background-color: #ffc107; color: #333; }
.action-btn.delete { background-color: #dc3545; color: white; }
.action-btn.view { background-color: #17a2b8; color: white; }
.action-btn:hover { 
    box-shadow: 0 0 0 #000; 
    transform: translate(1px, 1px); /* Make it look like the shadow "pressed" */
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
    .grid-3-col {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }
    .form-area, .table-area {
        grid-column: 1 / -1;
    }
    .container {
        padding: 15px;
    }
}