:root {
  color-scheme: light;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  background: #f4f1ec;
  color: #1f1b16;
}

body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #f4f1ec 0%, #ebe1d3 100%);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

header {
  margin-bottom: 24px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-header p {
  margin: 0;
}

h1 {
  margin: 0 0 8px;
  font-size: 2.2rem;
}

.page-title-refresh {
  color: inherit;
  text-decoration: none;
}

.page-title-refresh:hover {
  text-decoration: underline;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.4rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.secondary {
  border: 1px solid #c3532f;
  background: transparent;
  color: #c3532f;
}

.secondary:hover {
  background: #f5dfd7;
}

.is-hidden {
  display: none;
}

.nav-link {
  color: #8a2f1b;
  text-decoration: none;
  font-weight: 600;
}

.nav-link:hover {
  text-decoration: underline;
}

.pill {
  border: 1px solid #d9cbb8;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fffdfa;
}

.card {
  background: #fffdfa;
  border: 1px solid #d9cbb8;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(31, 27, 22, 0.08);
  margin-bottom: 24px;
}

.auth-container {
  max-width: 460px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
}

.form {
  display: grid;
  gap: 16px;
}

.form.is-hidden {
  display: none;
}

.grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-actions {
  align-self: end;
  margin-top: 8px;
}

.us-travel-info {
  border: 1px solid #d9cbb8;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff8f2;
}

.us-travel-info > summary {
  cursor: pointer;
  font-weight: 400 !important;
  color: #1f1b16 !important;
  margin-bottom: 10px;
}

.us-travel-info > summary::marker {
  color: #1f1b16;
  font-weight: 400;
}

.us-travel-info[open] > summary {
  margin-bottom: 12px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
}

input {
  border: 1px solid #bda88b;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1rem;
  background: #fff;
}

input:disabled {
  background: #ece4d8;
  color: #6b5f4e;
  cursor: not-allowed;
}

select {
  border: 1px solid #bda88b;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1rem;
  background: #fff;
}

button {
  border: none;
  border-radius: 999px;
  background: #c3532f;
  color: #fff;
  padding: 10px 18px;
  font-size: 0.95rem;
  cursor: pointer;
}

button:hover {
  background: #a84324;
}

button:disabled {
  background: #d7c0b4;
  cursor: not-allowed;
}

.error {
  margin: 12px 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #ffe9e1;
  color: #8a2f1b;
  border: 1px solid #f1b9a8;
  font-size: 0.95rem;
}

.success {
  margin: 12px 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #e8f5e9;
  color: #1f5e37;
  border: 1px solid #b7e1c3;
  font-size: 0.95rem;
}

.muted {
  color: #6e5f52;
}

.hint {
  font-size: 0.8rem;
  color: #6e5f52;
}

.submit-status {
  margin: -4px 0 0;
  font-size: 0.9rem;
  color: #6e5f52;
}

.submit-status::before {
  content: "";
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 8px;
  border: 2px solid #d4c2ae;
  border-top-color: #8a2f1b;
  border-radius: 50%;
  vertical-align: -1px;
  animation: submit-spin 0.9s linear infinite;
}

@keyframes submit-spin {
  to {
    transform: rotate(360deg);
  }
}

.passport-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.passport-status.uploaded {
  background: #d9efe0;
  color: #1f5e37;
}

.passport-status.missing {
  background: #f3ece3;
  color: #6e5f52;
}

.profile-divider {
  border: 0;
  border-top: 1px solid #efe6d9;
  margin: 20px 0;
}

.passport-upload-inline {
  display: grid;
  gap: 10px;
}

.upload-message {
  margin: 0;
  font-size: 0.9rem;
}

.upload-message.pending {
  color: #6e5f52;
}

.upload-message.success {
  color: #1f5e37;
}

.upload-message.error {
  color: #8a2f1b;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  text-align: left;
  border-bottom: 1px solid #d9cbb8;
  padding-bottom: 8px;
}

tbody td {
  padding: 12px 6px;
  border-bottom: 1px solid #efe6d9;
}

.time-stack {
  display: grid;
  gap: 4px;
}

.time-primary {
  font-weight: 600;
}

.time-secondary {
  font-size: 0.85rem;
  color: #6e5f52;
}

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .grid-two {
    grid-template-columns: 1fr;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    display: none;
  }

  tbody tr {
    margin-bottom: 16px;
    border: 1px solid #d9cbb8;
    border-radius: 8px;
    padding: 12px;
    background: #fffdfa;
  }

  tbody td {
    border: none;
    padding: 6px 0;
    overflow-wrap: anywhere;
  }

  tbody td[data-label] {
    display: grid;
    grid-template-columns: minmax(112px, 38%) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  tbody td[data-label]::before {
    content: attr(data-label);
    color: #6e5f52;
    font-weight: 600;
  }
}
