body {
  min-width: 320px;
}

* {
  box-sizing: border-box;
}

button,
input,
select {
  max-width: 100%;
}

img {
  max-width: 100%;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.nav-btn {
  flex: 0 0 auto;
  border-radius: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: rgb(71 85 105);
  transition: all 0.2s ease;
}

.nav-btn:hover {
  background: white;
  color: #07113E;
}

.nav-btn.active {
  background: #07113E;
  color: white;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
}

.panel {
  border-radius: 1.5rem;
  border: 1px solid rgb(30 41 59);
  background: rgb(15 23 42);
  padding: 1.25rem;
  color: rgb(241 245 249);
}

.step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 1rem;
  background: rgb(2 6 23);
  padding: 1rem;
  color: rgb(226 232 240);
}

.edit-input {
  margin-top: 0.25rem;
  width: 100%;
  min-width: 0;
  border-radius: 1rem;
  border: 1px solid rgb(51 65 85);
  background: rgb(2 6 23);
  padding: 0.75rem;
  color: rgb(241 245 249);
  outline: none;
}

.edit-input:focus {
  border-color: rgb(34 211 238);
}

.setting-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 1rem;
  border: 1px solid rgb(30 41 59);
  background: rgb(2 6 23);
  padding: 0.85rem;
  color: rgb(226 232 240);
  margin-top: 0.75rem;
}

.setting-check input {
  height: 1.25rem;
  width: 1.25rem;
  accent-color: rgb(34 211 238);
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 1rem;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

thead {
  color: rgb(148 163 184);
}

th,
td {
  padding: 0.85rem 0.65rem;
  border-bottom: 1px solid rgb(30 41 59);
}

tr:hover {
  background: rgba(2, 6, 23, 0.6);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
}

.badge.validada {
  background: rgba(52, 211, 153, 0.1);
  color: rgb(110 231 183);
}

.badge.revisar {
  background: rgba(251, 191, 36, 0.1);
  color: rgb(252 211 77);
}

.badge.pendiente {
  background: rgba(34, 211, 238, 0.1);
  color: rgb(103 232 249);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: rgb(30 41 59);
  padding: 0.5rem 0.75rem;
  color: rgb(103 232 249);
  margin-right: 0.35rem;
}

.delete-btn {
  color: rgb(252 165 165);
}

@media (max-width: 1024px) {
  header nav {
    width: 100%;
    justify-content: flex-start !important;
    overflow-x: auto;
    flex-wrap: nowrap !important;
    scrollbar-width: thin;
  }

  header nav::-webkit-scrollbar {
    height: 0.35rem;
  }

  header nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgb(203 213 225);
  }
}

@media (max-width: 768px) {
  main {
    padding-left: 0.875rem !important;
    padding-right: 0.875rem !important;
    padding-top: 11.5rem !important;
  }

  header > div {
    gap: 0.5rem !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  header img {
    max-height: 3rem;
  }

  .nav-btn {
    padding: 0.48rem 0.75rem;
    font-size: 0.8125rem;
    white-space: nowrap;
  }

  .panel {
    border-radius: 1rem;
    padding: 1rem;
  }

  .step,
  .edit-input,
  .setting-check,
  .action-btn {
    border-radius: 0.75rem;
  }

  .table-wrapper {
    overflow-x: visible;
  }

  table {
    min-width: 0;
    font-size: 0.8125rem;
  }

  thead {
    display: none;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  tr {
    margin-bottom: 0.85rem;
    overflow: hidden;
    border: 1px solid rgb(30 41 59);
    border-radius: 0.875rem;
    background: rgb(2 6 23);
  }

  tr:hover {
    background: rgb(2 6 23);
  }

  td {
    display: grid;
    grid-template-columns: minmax(7.5rem, 38%) minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.7rem 0.85rem;
    overflow-wrap: anywhere;
  }

  td::before {
    content: attr(data-label);
    color: rgb(148 163 184);
    font-size: 0.75rem;
    font-weight: 700;
  }

  td:first-child {
    grid-template-columns: 1fr;
    background: rgb(15 23 42);
  }

  td:first-child::before {
    content: none;
  }

  .action-btn {
    width: 100%;
    margin-right: 0;
    margin-bottom: 0.5rem;
  }

  .action-btn:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  main {
    padding-top: 12rem !important;
  }

  .panel {
    padding: 0.85rem;
  }

  td {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .badge {
    width: fit-content;
  }
}
