:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  background: #f4f4f4;
  font-size: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: #f4f4f4;
}

/* Full-width video header; keep the video's natural proportions */
.page-header {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.page-header video {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
}

/* Main page */
.shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 15px;
}

/* Blue heading bar */
.hero {
  margin: 0;
  padding: 5px;
  background: #5b9bd5;
}

.hero h1 {
  margin: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 400;
  text-transform: uppercase;
}

.hero p {
  display: none;
}

/* Yellow status section */
.legend {
  margin: 26px 0 29px;
  padding: 5px 0;
  color: #000;
  background: #ffff00;
}

.legend h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.legend-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.legend-item {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  font-size: 16px;
  font-weight: 700;
  line-height: 26px;
}

.legend-item .badge {
  width: auto;
  font-weight: 700;
  text-transform: uppercase;
}

/* Search form */
.search-card {
  margin-bottom: 30px;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 133px 133px;
  align-items: end;
  gap: 26px;
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.field label {
  margin-bottom: 5px;
  color: #333;
  font-size: 14px;
}

.field input {
  width: 100%;
  height: 44px;
  padding: 8px 12px;
  border: 1px solid #b5d5ff;
  border-radius: 3px;
  outline: none;
  background: #fff;
  font-family: inherit;
  font-size: 16px;
}

.field input:focus {
  border-color: #5b9bd5;
}

/* Submit and reset buttons */
.button {
  display: inline-block;
  width: 100%;
  height: 44px;
  padding: 12px 10px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

button[type="submit"] {
  background: #198754;
}

button[type="submit"]:hover {
  background: #157347;
}

.button.danger {
  background: #dc3545;
}

.button.danger:hover {
  background: #bb2d3b;
}

/* Results table */
.table-wrap {
  display: block;
  margin-top: 42px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 16px;
}

th {
  padding: 8px 5px;
  border-right: 1px solid #fff;
  background: #9bc2e6;
  text-align: left;
  font-weight: 700;
}

th:last-child {
  border-right: none;
}

td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  background: #e9edf4;
}

/* Search messages */
.message {
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 4px;
  font-weight: 700;
}

.message.error {
  border: 1px solid #f5c2c7;
  color: #842029;
  background: #f8d7da;
}

/* Mobile layout */
@media (max-width: 760px) {
  .hero h1 {
    font-size: 20px;
  }

  .legend-item {
    grid-template-columns: 1fr;
    line-height: 22px;
    margin-bottom: 6px;
  }

  .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px 12px;
  }

  .table-wrap {
    margin-top: 30px;
  }

  table {
    min-width: 900px;
  }
}

/* Match the smaller sizing in the first screenshot */
.shell {
  padding-left: 15px !important;
  padding-right: 15px !important;
}

.hero {
  margin-top: 0 !important;
  padding: 5px !important;
}

.hero h1 {
  font-size: 28px !important;
  line-height: 34px !important;
  font-weight: 400 !important;
}

.legend {
  margin-top: 26px !important;
  margin-bottom: 29px !important;
  padding: 5px 0 !important;
}

.legend h2 {
  margin-bottom: 4px !important;
  font-size: 16px !important;
  line-height: 20px !important;
}

.legend-item {
  grid-template-columns: 245px minmax(0, 1fr) !important;
  font-size: 16px !important;
  line-height: 26px !important;
}

.form-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 133px 133px !important;
  gap: 26px !important;
}

.field label {
  font-size: 14px !important;
}

.field input {
  height: 42px !important;
  font-size: 16px !important;
}

.button {
  height: 43px !important;
  font-size: 16px !important;
}

.table-wrap {
  margin-top: 20px !important;
}

table {
  font-size: 16px !important;
}

th {
  padding: 7px 5px !important;
}

@media (max-width: 760px) {
  .legend-item {
    grid-template-columns: 1fr !important;
    line-height: 22px !important;
  }

  .form-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
}

body {
  zoom: 0.85;
  width: 100%;
}


/* Keep the video responsive */
.page-header,
.page-header video {
  display: block;
  width: 100%;
}

.page-header video {
  height: auto;
}

/* Tablet */
@media (max-width: 900px) {
  .shell {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .legend-item {
    grid-template-columns: 210px minmax(0, 1fr) !important;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 110px 100px !important;
    gap: 14px !important;
  }
}

/* Mobile */
@media (max-width: 600px) {
  body {
    zoom: 1;
    width: 100%;
  }

  .shell {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .hero {
    padding: 8px !important;
  }

  .hero h1 {
    font-size: 18px !important;
    line-height: 1.25 !important;
  }

  .legend {
    margin-top: 14px !important;
    margin-bottom: 18px !important;
    padding: 8px !important;
  }

  .legend h2 {
    font-size: 14px !important;
  }

  .legend-item {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 2px;
    margin-bottom: 8px;
    font-size: 13px !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .field input,
  .button {
    width: 100%;
    min-height: 42px;
  }

  .table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 850px;
  }
}


/* Admin records layout */
body.admin-page {
  min-height: 100vh;
  background: #f4f7fb;
}

.admin-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  min-height: 100vh;
  padding: 28px 18px;
  color: #fff;
  background: #142b49;
}

.admin-logout {
  margin-bottom: 30px;
}

.admin-logout .button {
  width: 100%;
}

.admin-nav-title {
  margin: 0 0 14px;
  color: #fff;
  font-size: 22px;
  text-decoration: underline;
}

.admin-nav-link {
  display: block;
  padding: 14px 16px;
  border-radius: 5px;
  color: #fff;
  background: #29466d;
  font-weight: 700;
  text-decoration: none;
}

.admin-nav-link.active {
  background: #355781;
}

.admin-main {
  min-width: 0;
  padding: 28px;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.admin-add-panel,
.admin-records-panel {
  min-width: 0;
}

.admin-add-panel {
  padding: 20px;
  border: 1px solid #d7e1ed;
  border-radius: 8px;
  background: #fff;
}

.admin-add-panel h1 {
  margin: 0 0 18px;
  font-size: 26px;
}

.admin-add-form {
  display: grid;
  gap: 15px;
}

.admin-add-form > div,
.admin-fetch-form > div {
  min-width: 0;
}

.admin-add-form label,
.admin-fetch-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.admin-add-form input,
.admin-add-form select,
.admin-fetch-form input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #b9cce2;
  border-radius: 5px;
  background: #fff;
  font: inherit;
}

.admin-add-form input[type="file"] {
  padding: 7px;
}

.admin-add-form .muted {
  display: block;
  margin-top: 5px;
  font-size: 13px;
}

.admin-add-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.admin-fetch-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 20px;
  border-radius: 8px;
  background: #dceafa;
}

.admin-fetch-actions .button {
  width: 100%;
  min-height: 42px;
}

.admin-table-wrap {
  margin-top: 22px;
  overflow-x: auto;
}

.admin-table-wrap table {
  min-width: 900px;
}

.admin-table-wrap th {
  white-space: nowrap;
}

.admin-table-wrap .actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-table-wrap .actions form {
  margin: 0;
}

.admin-main .pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 1100px) {
  .admin-layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .admin-workspace {
    grid-template-columns: 1fr;
  }

  .admin-add-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-add-actions {
    grid-column: 1 / -1;
  }

  .admin-fetch-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    min-height: auto;
    padding: 14px;
  }

  .admin-logout {
    margin-bottom: 16px;
  }

  .admin-nav-title {
    font-size: 18px;
  }

  .admin-main {
    padding: 14px;
  }

  .admin-add-form,
  .admin-fetch-form {
    grid-template-columns: 1fr;
  }

  .admin-add-panel {
    padding: 15px;
  }
}


/* Admin login page */
.topbar {
  display: flex;
  align-items: center;
  min-height: 76px;
  padding: 16px 6%;
  color: #fff;
  background: #142b49;
}

.brand {
  font-size: 20px;
  font-weight: 700;
}

.auth {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 76px);
  padding: 70px 20px 40px;
}

.auth .panel {
  width: min(100%, 480px);
  padding: 30px;
  border: 1px solid #d7e1ed;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(20 43 73 / 8%);
}

.auth h1 {
  margin: 0 0 24px;
  color: #142b49;
  font-size: 30px;
}

.auth form p {
  margin: 0 0 18px;
}

.auth label {
  display: block;
  margin-bottom: 7px;
  color: #142b49;
  font-weight: 700;
}

.auth input:not([type="hidden"]) {
  display: block;
  width: 100%;
  height: 46px;
  padding: 10px 12px;
  border: 1px solid #b9cce2;
  border-radius: 5px;
  background: #fff;
  color: #111;
  font: inherit;
}

.auth input:focus {
  border-color: #2878a8;
  outline: 2px solid rgb(40 120 168 / 15%);
}

.auth button.button {
  display: inline-block;
  width: auto;
  min-width: 120px;
  min-height: 44px;
  padding: 10px 22px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: #1d6e9f;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth button.button:hover {
  background: #165b85;
}

@media (max-width: 600px) {
  .topbar {
    min-height: 64px;
    padding: 14px 18px;
  }

  .auth {
    min-height: calc(100vh - 64px);
    padding: 32px 14px;
  }

  .auth .panel {
    padding: 22px 18px;
  }

  .auth h1 {
    font-size: 25px;
  }
}