/* GENERAL */
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    font-size: 13px;
}

h2 {
    color: #333;
}

/* FORM ELEMENTS */
form input,
form textarea,
form select {
    width: 100%;
    max-width: 250px;
    padding: 6px;
    margin: 4px 0;
    font-size: 12px;
    box-sizing: border-box;
}

button {
    padding: 5px 10px;
    background: #007BFF;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 12px;
}

button:hover {
    background: #0056b3;
}

/* TABLE */
table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 15px;
    table-layout: auto; /* IMPORTANT FIX */
}

th, td {
    border: 1px solid #ccc;
    padding: 6px;
    text-align: left;
    vertical-align: top;
    font-size: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

th {
    background: #f2f2f2;
}

/* COLUMN WIDTH CONTROL */

/* Description - MAIN FIX */
th:nth-child(7), td:nth-child(7) {
    width: 450px;
}

/* Status */
th:nth-child(8), td:nth-child(8) {
    width: 80px;
}

/* Status Update */
th:nth-child(9), td:nth-child(9) {
    width: 130px;
}

/* Remarks (reduced to give space to description) */
th:nth-child(16), td:nth-child(16) {
    width: 140px;
}

/* DESCRIPTION TEXT */
td:nth-child(7) {
    white-space: normal;
    word-break: break-word;
}

/* REMARKS */
td:nth-child(16) p {
    margin: 2px 0;
    max-height: 80px;
    overflow-y: auto;
    font-size: 11px;
}

/* FORMS INSIDE TABLE */
td form {
    margin: 2px 0;
}

td select,
td input[type="text"] {
    width: 100%;
    font-size: 11px;
    padding: 3px;
    box-sizing: border-box;
}

td button {
    margin-top: 3px;
    padding: 3px 6px;
    font-size: 11px;
}

/* NAVIGATION LINKS */
.nav-links {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.nav-links a {
    background: #007bff;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
}

.nav-links a:hover {
    background: #0056b3;
}

/* STATUS TABS */
.tabs {
    margin: 10px 0;
}

.tabs a {
    padding: 5px 10px;
    background: #6c757d;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    margin-right: 5px;
    font-size: 12px;
}

.tabs a.active {
    background: #28a745;
}

/* PAGINATION */
.pagination {
    margin-top: 20px;
}

.pagination a {
    padding: 4px 8px;
    background: #eee;
    margin: 2px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
}

.pagination strong {
    padding: 4px 8px;
    background: #007bff;
    color: white;
    margin: 2px;
    border-radius: 3px;
    font-size: 12px;
}

/* LINKS */
a {
    text-decoration: none;
    color: blue;
}

a:hover {
    text-decoration: underline;
}
