:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --background-color: #f4f4f4;
  --text-color: #333;
  --border-radius: 8px;
  --error-color: #e74c3c;
  --success-color: #27ae60;
  --modal-overlay: rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  padding: 20px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: var(--modal-overlay);
  overflow-y: auto;
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 600px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.close {
  position: absolute;
  right: 20px;
  top: 10px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
  z-index: 1;
}

.close:hover,
.close-reject:hover {
  color: var(--text-color);
}

.close-reject {
  position: absolute;
  right: 20px;
  top: 10px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
  z-index: 1;
}

#editForm {
  display: grid;
  gap: 15px;
  margin-top: 20px;
}

#editForm button[type="submit"] {
  background-color: var(--success-color);
  margin-top: 10px;
}

#editForm button[type="submit"]:hover {
  background-color: #219a52;
}

#totalStatistics {
  margin-bottom: 30px;
}

#totalStatisticsTable {
  width: 100%;
  border-collapse: collapse;
}

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

#totalStatisticsTable th {
  background-color: #3498db;
  font-weight: bold;
}

#totalStatisticsTable tr:last-child {
  font-weight: bold;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1,
h2,
h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
}

form {
  display: grid;
  gap: 15px;
  margin-bottom: 30px;
}

select,
input,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 16px;
  transition: border-color 0.3s ease;
}

select:focus,
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

input[readonly] {
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.8;
}

button {
  padding: 12px 20px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease, transform 0.1s ease;
}

button:hover {
  background-color: #2980b9;
}

button:active {
  transform: scale(0.98);
}

.edit-btn {
  background-color: #f39c12;
  margin-right: 5px;
}

.edit-btn:hover {
  background-color: #d68910;
}

.fill-btn {
  background-color: var(--success-color);
  margin-right: 5px;
}

.fill-btn:hover {
  background-color: #219a52;
}

.cancel-btn,
.revert-btn,
.reject-btn {
  background-color: var(--error-color);
}

.cancel-btn:hover,
.revert-btn:hover,
.reject-btn:hover {
  background-color: #c0392b;
}

.approve-btn {
  background-color: var(--success-color);
  margin-right: 5px;
}

.approve-btn:hover {
  background-color: #219a52;
}

.filters {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

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

th {
  background-color: var(--primary-color);
  color: white;
}

tr:nth-child(even) {
  background-color: #f8f8f8;
}

#statistics table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

#statistics th {
  background-color: #3498db;
  font-weight: bold;
}

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

#statistics tr:nth-child(even) {
  background-color: #3498db;
}

#positionStatistics table {
  margin-top: 20px;
}

#positionStatistics th {
  background-color: var(--primary-color);
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 20px;
  border-radius: var(--border-radius);
  z-index: 1000;
}

.success-message,
.error-message {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: var(--border-radius);
  color: white;
  font-weight: bold;
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
}

.success-message {
  background-color: var(--success-color);
}

.error-message {
  background-color: var(--error-color);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .filters {
    flex-direction: column;
  }

  .container {
    padding: 10px;
  }

  table {
    font-size: 14px;
  }

  th,
  td {
    padding: 8px;
  }

  .success-message,
  .error-message {
    top: 10px;
    right: 10px;
    left: 10px;
    text-align: center;
  }

  td button {
    display: block;
    width: 100%;
    margin-bottom: 5px;
  }

  .modal-content {
    margin: 10% auto;
    width: 95%;
    padding: 15px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  form {
    gap: 10px;
  }

  select,
  input,
  textarea,
  button {
    font-size: 14px;
  }

  .modal-content {
    margin: 5% auto;
  }
}

.language-buttons {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 1000;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease;
}

.lang-btn:hover {
  transform: scale(1.5);
}

.lang-btn img {
  border: 1px solid #ddd;
  border-radius: 3px;
}


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

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  border-radius: 5px;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Form styles */
#editForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#editForm select,
#editForm input,
#editForm textarea {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

#editForm button {
  padding: 10px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#editForm button:hover {
  background-color: #45a049;
}

/* Login Modal Styles */
.login-modal {
  display: none;
  z-index: 1002;
}

.login-modal.show {
  display: block;
}

.login-modal .modal-content {
  max-width: 400px;
  margin: 10% auto;
}

#loginForm {
  display: grid;
  gap: 15px;
  margin-top: 20px;
}

#loginForm input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 16px;
}

#loginForm input:focus {
  outline: none;
  border-color: var(--primary-color);
}

#loginForm button {
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#loginForm button:hover {
  background-color: #2980b9;
}

#loginError {
  padding: 10px;
  background-color: #fee;
  color: var(--error-color);
  border: 1px solid var(--error-color);
  border-radius: var(--border-radius);
  font-size: 14px;
}

/* User Info Styles */
.user-info {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 10px 15px;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#userEmail {
  font-weight: 500;
  color: var(--text-color);
}

.logout-btn {
  padding: 8px 16px;
  background-color: var(--error-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.logout-btn:hover {
  background-color: #c0392b;
}

@media (max-width: 768px) {
  .user-info {
    top: 70px;
    left: 10px;
    right: 10px;
    flex-direction: column;
    align-items: flex-start;
  }

  .login-modal .modal-content {
    margin: 20% auto;
    width: 95%;
  }
}