body {
    font-family: sans-serif;
    margin: 20px;
    background-color: #f4f4f4;
    color: #333;
}

h1 {
    text-align: center;
    color: #333;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.section {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.section h2 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.controls, .form-container {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap; /* 允许换行 */
}

.form-container input[type="text"],
.form-container input[type="number"],
.form-container select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex-grow: 1; /* 输入框尽可能填充空间 */
    min-width: 150px; /* 最小宽度 */
}

.form-container button {
    padding: 8px 15px;
    background-color: #5cb85c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.form-container button:hover {
    background-color: #4cae4c;
}

.controls input[type="file"] {
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 4px;
}

.controls button {
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.controls button:hover {
    background-color: #0056b3;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

table th {
    background-color: #f9f9f9;
}

table tr:nth-child(even) {
    background-color: #f2f2f2;
}

table button {
    margin-right: 5px;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

table .edit-btn {
    background-color: #f0ad4e;
    color: white;
}

table .edit-btn:hover {
    background-color: #ec971f;
}

table .delete-btn {
    background-color: #d9534f;
    color: white;
}

table .delete-btn:hover {
    background-color: #c9302c;
}

input[type="text"]#hsSearch, input[type="text"]#vsSearch {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: calc(100% - 20px); /* 占据几乎整行 */
    margin-bottom: 10px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .form-container {
        flex-direction: column;
        align-items: stretch;
    }
    .form-container input[type="text"],
    .form-container input[type="number"],
    .form-container select,
    .form-container button {
        width: 100%;
        margin-bottom: 10px; /* 在堆叠时增加间距 */
    }
}

@media (max-width: 600px) {
  #yearCheckboxes {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px 10px;
    width: 100%;
  }
  #yearCheckboxes > div {
    width: 100%;
    min-width: 0;
    margin-bottom: 0 !important;
  }
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place, overlay content */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed for the modal itself */
    background-color: rgba(0,0,0,0.5); /* Semi-transparent black overlay */
    /* Flexbox for centering modal-content */
    display: flex; /* Changed from none to flex when shown by JS */
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto; /* Should be redundant if using flex on .modal */
    padding: 20px;
    border: 1px solid #888;
    width: 98% !important;
    max-width: none !important;
    min-width: 0 !important;
    border-radius: 8px;
    position: relative; /* For positioning the close button */
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
    max-height: 90vh; /* Max height for the content box */
    display: flex; /* Use flex to manage content layout */
    flex-direction: column;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 20px;
}

/* Style for the container that holds the charts inside the modal */
#chartsContainer, #queryChartsContainer { /* Apply to both modal chart containers */
    display: flex;
    flex-direction: column; /* Charts stacked vertically */
    gap: 20px;
    overflow-y: auto; /* Enable vertical scroll for charts area if content overflows */
    flex-grow: 1; /* Allow this area to take up available space */
    padding: 10px; /* Some padding around charts */
    min-height: 200px; /* Ensure it has some minimum height */
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

.close {
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}
.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}
.modal-content {
    position: relative;
}

/* 职高查询表格：每个学校最后一行加粗底边框 */
#vocationalQueryResultsTable tbody tr.school-group-end > td {
    border-bottom: 4px solid #222 !important;
} 