html {
  font-size: 14px;
}

@media (prefers-color-scheme: dark) {
          .dropdown-menu .dropdown-item:hover,
          .dropdown-menu .dropdown-item:focus {
            background-color: #3a3b3c !important;
            color: #e4e6eb !important;
          }
        #submitBtn.btn-primary {
          background-color: #14532d !important;
          color: #e4e6eb !important;
          border-color: #166534 !important;
        }
        #submitBtn.btn-primary:hover {
          background-color: #166534 !important;
          color: #fff !important;
        }
      .btn-primary.file-action-btn {
        background-color: #1a2332 !important;
        color: #e4e6eb !important;
        border-color: #22304a !important;
      }
      .btn-primary.file-action-btn:hover {
        background-color: #22304a !important;
        color: #fff !important;
      }
      .btn-secondary.file-action-btn {
        background-color: #23272b !important;
        color: #e4e6eb !important;
        border-color: #444 !important;
      }
      .btn-secondary.file-action-btn:hover {
        background-color: #343a40 !important;
        color: #fff !important;
      }
      .btn-danger.file-action-btn {
        background-color: #3a1a1a !important;
        color: #e4e6eb !important;
        border-color: #5a2323 !important;
      }
      .btn-danger.file-action-btn:hover {
        background-color: #5a2323 !important;
        color: #fff !important;
      }
    .navbar-toggler {
      border-color: #e4e6eb !important;
    }
    .navbar-toggler-icon {
      background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(228,230,235,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
    }
  html, body, .container, main {
    background-color: #181a1b;
    color: #e4e6eb;
  }

  .navbar, .navbar-brand, .navbar-nav .nav-link, .dropdown-menu, .modal-content {
    background-color: #23272b !important;
    color: #e4e6eb !important;
  }
  .btn, .file-action-btn {
    background-color: #343a40;
    color: #e4e6eb;
    border-color: #444;
  }
  .btn:hover, .file-action-btn:hover {
    background-color: #495057;
    color: #fff;
  }
  .form-control, .form-floating > .form-control, .form-floating > .form-control-plaintext {
    background-color: #23272b;
    color: #e4e6eb;
    border-color: #444;
  }
  .modal {
    background-color: rgba(24, 26, 27, 0.95);
  }
  .close-button {
    color: #e4e6eb;
  }
  .close-button:hover, .close-button:focus {
    color: #bbb;
  }
  a, .nav-link, .navbar-brand {
    color: #e4e6eb !important;
  }
  .dropdown-menu {
    background-color: #23272b;
    color: #e4e6eb;
  }
  .card, .card-header, .card-footer {
    background-color: #23272b !important;
    color: #e4e6eb !important;
    border-color: #444 !important;
  }
  .card-title, .card-text {
    color: #e4e6eb !important;
  }
  .card-img, .card-img-top, .card-img-bottom {
    background-color: #181a1b !important;
  }

  input[type="file"].form-control,
  #FileUpload {
    background-color: #23272b !important;
    color: #e4e6eb !important;
    border-color: #444 !important;
  }
  input[type="file"].form-control::-webkit-file-upload-button {
    background: #343a40 !important;
    color: #e4e6eb !important;
    border: 1px solid #444 !important;
  }
  input[type="file"].form-control::file-selector-button {
    background: #343a40 !important;
    color: #e4e6eb !important;
    border: 1px solid #444 !important;
  }

    table, .table {
      background-color: #23272b !important;
      color: #e4e6eb !important;
      border-color: #444 !important;
    }
    th, td {
      background-color: #23272b !important;
      color: #e4e6eb !important;
      border-color: #444 !important;
    }
    thead, .table thead th {
      background-color: #181a1b !important;
      color: #e4e6eb !important;
    }
    tbody tr {
      background-color: #23272b !important;
      color: #e4e6eb !important;
    }
    tbody tr:nth-child(even) {
      background-color: #202225 !important;
    }

    .table .text-muted,
    .table .small,
    .table td.text-muted.small,
    .table td.uploaded-utc {
      color: #e4e6eb !important;
    }
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.navbar-nav .nav-link {
  font-size: 1.15rem;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.modal-content {
  /* Only apply these styles to image preview modal, not all modals */
}

.modal-content.image-preview {
  margin: auto;
  display: block;
  width: 85vw;
  height: 80vh;
  object-fit: contain;
}

.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);

  display: none;
  align-items: center;
  justify-content: center;
}

.close-button {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

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

.file-action-btn {
    min-width: 44px;
    min-height: 44px;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    display: inline-block;
    text-align: center;
}
.file-actions-cell {
    vertical-align: middle;
}
@media (max-width: 576px) {
    .file-actions-cell {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .file-action-btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    .file-actions-cell form.d-inline {
        width: 100%;
    }
}