body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

header {
  background-color: #0f73d1;
  color: white;
  text-align: center;
  padding: 1em;
  position: relative;
}

/* Ensure the main content area fills available space */
main {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 20px;
  height: 100vh; /* Full viewport height */
}


#welcome-screen {
  flex: 1; /* Allows it to take available space */
}

#login-screen {
  position: center;
  top: 0;
  right: 0;
  background-color: white;
  color: #0f73d1;
  padding: 10px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

#login-screen h2 {
  margin: 0;
  font-size: 16px;
}

#login-form {
  position: relative;
}

#login-form input {
  margin-bottom: 10px;
  padding: 5px;
}

#login-form button {
  background-color: #0f73d1;
  color: white;
  border: none;
  padding: 5px;
  cursor: pointer;
}

#login-form button:hover {
  background-color: #0c5ca8;
}

.container {
  display: flex;
  flex-direction: row;
  padding: 20px;
}

aside {
  width: 20%;
}

.sidebar {
  list-style-type: none;
  padding: 0;
}

.sidebar-item {
  padding: 10px;
  cursor: pointer;
  background-color: #f1f1f1;
  margin: 5px 0;
  border-radius: 4px;
}

.sidebar-item:hover {
  background-color: #ddd;
}

main {
  width: 80%;
  padding: 0 20px;
}

/* Content area should take all remaining space */
#content-display {
  flex-grow: 1; /* Fill remaining space */
  display: flex;
  flex-direction: column;
}

.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: white;
  margin: 15% auto;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
}

button {
  margin-top: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  cursor: pointer; /* Indicate that the header is clickable */
  background-color: #f4f4f4;
  position: relative;
}

th:hover {
  background-color: #e0e0e0;
}

th.sorted-asc::after {
  content: '▲'; /* Upward arrow for ascending sort */
  position: absolute;
  right: 8px;
  color: #555;
}

th.sorted-desc::after {
  content: '▼'; /* Downward arrow for descending sort */
  position: absolute;
  right: 8px;
  color: #555;
}

/* Make sure the edit form fills the space */
#edit-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

#edit-item-form {
  flex-grow: 1;
  width: 100%;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 5px;
  box-sizing: border-box; /* Ensures padding doesn't increase width */
}

#edit-container {
  width: 100%;
  display: flex;
  flex-direction: column;
}

#details-section {
  display: flex;
  flex-direction: column; /* Change to column to stack items vertically */
  justify-content: flex-start;
  align-items: flex-start;
  gap: 20px;
}

.left-column {
  flex: 1;
  min-width: 50%;
}

.right-column {
  flex: 1;
  min-width: 50%;
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 10px;
}

.form-group label {
  font-weight: bold;
  display: block;
}

textarea {
  width: 100%;
}

.url-section {
  margin-top: 20px;
}

input, select, textarea {
  width: 100%; /* Ensures inputs don’t resize beyond the container */
  box-sizing: border-box; /* Prevents width overflow */
  padding: 5px;
  margin-bottom: 10px;
}

textarea {
  resize: none; /* Prevents users from resizing */
}

button {
  margin-top: 10px;
}

#details-section .priority-dropdown {
  display: flex;
  flex-direction: column; /* Ensures that the dropdown is below the heading */
}

.comment {
  display: flex;
  align-items: center; /* Align text and button vertically */
  justify-content: space-between; /* Space them out */
  gap: 10px; /* Adjust spacing between text and button */
  padding: 8px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.comment-text {
  flex-grow: 1; /* Make the text take up remaining space */
  margin: 0;
}

.delete-comment-btn {
  background: none;
  border: none;
  color: red;
  cursor: pointer;
  font-size: 16px;
}
#tag-container, #topic-container {
  margin-bottom: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 8px;
  border: 1px solid #ddd;
}

.selected-tag-row, .selected-topic-row {
  background-color: #f9f9f9;
}

.add-btn, .remove-tag-btn, .remove-topic-btn {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  border: none;
  background-color: #007bff;
  color: white;
}

.remove-tag-btn, .remove-topic-btn {
  background-color: #dc3545;
}

.tag-selector, .topic-selector {
  width: 100%;
  padding: 6px;
}