body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f0f2f5;
  overflow: hidden;
}

/* Loading Animation */

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: #007bff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin-top: 10px;
  align-self: center;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* LOGIN FORM */

#loginContainer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  height: 100vh;
  position: relative;
  background-color: #f5f5f5;
}

#logoContainer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 0;
  pointer-events: none;
}

#logo {
  margin-top: 70px;
  margin-right: 55px;
  max-width: 80vw;
  max-height: 80vh;
  width: 850px;
  height: 850px;
  object-fit: contain;
  opacity: 0.1;
}

#loginForm {
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

#loginForm button {
  margin-top: 10px;
}

.btn-first {
  margin-top: 20px;
  padding: 10px 20px;
  text-decoration: none;
  color: white;
  background-color: #007bff;
  border: none;
  border-radius: 5px;
  display: inline-block;
  align-self: center;
}

.btn-first:hover {
  background-color: #0056b3;
}

h2 {
  margin-top: 0;
  font-size: 1.5em;
  color: #333;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
  margin-top: 5px;
}

input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 1em;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: #007bff;
  outline: none;
}

button[type="submit"] {
  background-color: #007bff;
  color: #ffffff;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
  margin-top: 20px;
  transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
  background-color: #0056b3;
}

.error {
  color: red;
  font-size: 0.875em;
  margin-top: 10px;
}

@media (max-width: 768px) {
  #logo {
    max-width: 70vw;
    max-height: 70vh;
  }

  #loginForm {
    max-width: 90%;
  }
}

@media (max-width: 480px) {
  #logo {
    max-width: 60vw;
    max-height: 60vh;
  }

  #loginForm {
    max-width: 100%;
    padding: 15px;
  }
}

/* Modal styles */

#jobModal {
  display: none; /* Ensure it's hidden by default */
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  transition: opacity 0.3s ease;
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover,
.close:focus {
  color: #333;
}

h2#modalTitle {
  margin-top: 0;
  font-size: 1.5em;
  color: #333;
}

.form-group {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.form-group label {
  margin-right: 15px;
  width: 120px;
  text-align: left;
}

.form-group div[contenteditable] {
  flex-grow: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-height: 100px;
  overflow-y: auto;
  font-family: "Courier New", Courier, monospace;
  box-sizing: border-box;
}

.form-group select {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1em;
  width: 100%;
  box-sizing: border-box;
  font-family: "Arial", sans-serif;
}

@media (max-width: 768px) {
  .form-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-group label {
    margin-right: 0;
    width: auto;
    margin-bottom: 5px;
  }

  .form-group div[contenteditable],
  .form-group select {
    width: 100%;
    min-height: 80px;
  }
}

@media (max-width: 480px) {
  .form-group div[contenteditable],
  .form-group select {
    min-height: 60px;
  }

  .form-group {
    margin-bottom: 10px;
  }
}

textarea {
  resize: vertical;
}

@media (max-width: 600px) {
  #loginForm {
    padding: 15px;
    max-width: 90%;
  }

  .modal-content {
    width: 95%;
  }
}

/* Table Styling */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background-color: #fff;
}

th,
td {
  padding: 12px;
  text-align: left;
  border: 1px solid #ddd;
  box-sizing: border-box;
}

th {
  background-color: #f4f4f4;
  font-weight: bold;
  border-bottom: 2px solid #007bff;
}

td {
  background-color: #ffffff;
}

@media (max-width: 600px) {
  table {
    border: 0;
  }

  thead {
    display: none;
  }

  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  tr {
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
  }

  td {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border: none;
    text-align: right;
  }

  td::before {
    content: attr(data-label);
    flex: 1;
    font-weight: bold;
    text-align: left;
  }
}

/* Header Styling */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: #294c69;
  color: #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

header h1 {
  margin: 0;
  font-size: 1.8em;
  font-weight: bold;
}

.header-buttons {
  display: flex;
  gap: 10px;
}

button {
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

button#addJobBtn {
  background-color: #237ec9db;
  color: #ffffff;
}

button#addJobBtn:hover {
  background-color: #83bcea;
}

button#addJobBtn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(75, 135, 225, 0.3);
}

button#logoutBtn {
  background-color: #dc3545;
  color: #ffffff;
}

button#logoutBtn:hover {
  background-color: #c82333;
}

button#logoutBtn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
}

@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-buttons {
    flex-direction: column;
    width: 100%;
  }

  button {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    margin-top: 10px;
  }
}

#deleteModal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-align: center;
}

@media (max-width: 768px) {
  .modal-content {
    margin: 10% auto;
    padding: 15px;
  }

  button#confirmDeleteBtn,
  button#cancelDeleteBtn {
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    margin: 5% auto;
    padding: 10px;
  }

  button#confirmDeleteBtn,
  button#cancelDeleteBtn {
    padding: 6px 12px;
    font-size: 14px;
  }
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

button#confirmDeleteBtn {
  background-color: #dc3545;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button#cancelDeleteBtn {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button#confirmDeleteBtn:hover {
  background-color: #c82333;
}

button#cancelDeleteBtn:hover {
  background-color: #0056b3;
}
