@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --ink: #10231e;
  --muted: #6c7a75;
  --line: #dce7e2;
  --accent: #22745f;
  --accent-dark: #133f35;
  --orange: #f15a24;
  --soft: #edf6f2;
  --shadow: 0 18px 50px rgba(18, 50, 42, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(34, 116, 95, 0.13), transparent 30%),
    linear-gradient(180deg, #f8fbfa, var(--bg));
  font-family: Outfit, Arial, Helvetica, sans-serif;
}

button,
input { font: inherit; }

.portal-topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(18px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
}

.portal-brand img {
  width: 156px;
  height: 58px;
  object-fit: contain;
}

.portal-link,
.ghost,
.primary,
.document-actions a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0 16px;
  font-weight: 800;
  text-decoration: none;
}

.portal-link,
.ghost {
  border: 1px solid var(--line);
  color: var(--accent);
  background: var(--surface);
}

.primary {
  width: 100%;
  border: 0;
  color: #fff;
  background: var(--orange);
  box-shadow: 0 14px 26px rgba(241, 90, 36, 0.2);
  cursor: pointer;
}

.primary:disabled { opacity: 0.65; cursor: wait; }

.portal-page {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.portal-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
  gap: 30px;
  align-items: center;
  min-height: calc(100vh - 190px);
}

.login-copy h1,
.result-head h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 0.98;
}

.login-copy p:not(.eyebrow) {
  max-width: 520px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.portal-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.access-card {
  display: grid;
  gap: 16px;
  padding: 24px;
}

label {
  display: grid;
  gap: 8px;
  color: #41514c;
  font-size: 13px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #d6e2dd;
  border-radius: 11px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(34, 116, 95, 0.12);
}

.portal-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.portal-message.is-error { color: #bf3f35; }
.portal-message.is-success { color: var(--accent); }

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.reservation-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
}

.reservation-summary div {
  min-height: 92px;
  padding: 18px;
  background: rgba(248, 251, 250, 0.92);
}

.reservation-summary span,
.document-meta,
.document-name span,
.section-title span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.reservation-summary strong {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.35;
}

.portal-section { margin-top: 28px; }

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 12px;
}

.section-title h2 {
  margin: 0;
  font-size: 26px;
}

.passenger-list {
  display: grid;
  gap: 10px;
}

.passenger-room,
.document-group {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  overflow: hidden;
}

.passenger-room-head,
.document-group h3 {
  margin: 0;
  padding: 14px 18px;
  color: var(--accent);
  background: var(--soft);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.passenger-room ul {
  margin: 0;
  padding: 8px 18px 16px 34px;
}

.passenger-room li {
  padding: 7px 0;
  border-bottom: 1px solid #edf2ef;
}

.passenger-room li:last-child { border-bottom: 0; }

.documents-board {
  display: grid;
  gap: 16px;
}

.document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}

.document-name strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.document-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.document-actions a {
  min-height: 36px;
  gap: 7px;
  color: #fff;
  background: var(--accent);
  font-size: 13px;
}

.document-actions a.download {
  background: var(--orange);
}

.document-action-icon {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.document-action-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state {
  padding: 18px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .portal-topbar {
    height: auto;
    padding: 14px;
  }

  .portal-brand img {
    width: 132px;
    height: 48px;
  }

  .portal-page {
    width: calc(100% - 24px);
    padding: 24px 0 42px;
  }

  .portal-login,
  .reservation-summary {
    grid-template-columns: 1fr;
  }

  .portal-login {
    min-height: auto;
  }

  .result-head,
  .document-row {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .document-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: center;
    justify-content: stretch;
  }

  .document-actions a {
    min-height: 38px;
    border-radius: 12px;
    padding: 0 10px;
    font-size: 0;
  }

  .document-actions a span:not(.document-action-icon) {
    display: none;
  }

  .document-action-icon,
  .document-action-icon svg {
    width: 19px;
    height: 19px;
  }
}
