:root {
  --brand-deep: #020b3d;
  --brand-navy: #07146b;
  --brand-royal: #005bea;
  --brand-blue: #008dff;
  --brand-cyan: #00c6fb;
  --brand-success: #10b981;
  --brand-danger: #ef4444;
  --surface: #ffffff;
  --surface-soft: #f5f8fc;
  --text: #111b32;
  --text-muted: #6e7890;
  --border: #dce4ef;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, #eef5ff 0%, #f7fafc 48%, #eafcff 100%);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.ticket-shell {
  display: grid;
  grid-template-columns: minmax(390px, 0.9fr) minmax(520px, 1.1fr);
  min-height: 100vh;
}

.ticket-shell-wide {
  grid-template-columns: minmax(360px, 0.72fr) minmax(620px, 1.28fr);
}

.ticket-hero {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  min-height: 100vh;
  padding: clamp(32px, 5vw, 64px);
  color: #fff;
  background:
    linear-gradient(145deg, rgba(2, 8, 40, 0.96), rgba(2, 11, 61, 0.93) 48%, rgba(7, 20, 107, 0.92)),
    url("../img/fundo.jpg") center/cover no-repeat;
}

.ticket-hero::before {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(0, 198, 251, 0.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 198, 251, 0.24) 1px, transparent 1px);
  background-size: 54px 54px;
  content: "";
  mask-image: linear-gradient(to bottom right, #000, transparent 78%);
}

.ticket-brand,
.ticket-hero-copy,
.ticket-hero-list {
  position: relative;
  z-index: 1;
}

.ticket-brand {
  display: inline-flex;
  width: fit-content;
}

.ticket-brand img {
  width: clamp(150px, 18vw, 220px);
  max-height: 92px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.24));
}

.ticket-hero-copy {
  margin: auto 0;
  padding: 42px 0;
}

.ticket-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid rgba(0, 198, 251, 0.28);
  border-radius: 999px;
  color: #bdefff;
  background: rgba(0, 198, 251, 0.08);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ticket-hero h1 {
  max-width: 620px;
  margin: 24px 0 16px;
  font-family: "Poppins", "Inter", sans-serif;
  font-size: clamp(2.35rem, 4.8vw, 4.4rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.ticket-hero p {
  max-width: 560px;
  margin: 0;
  color: rgba(234, 243, 255, 0.75);
  font-size: 1rem;
  line-height: 1.68;
}

.ticket-hero-list {
  display: grid;
  gap: 10px;
  margin-top: 32px;
}

.ticket-hero-list span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.82rem;
  font-weight: 700;
}

.ticket-hero-list i {
  color: #86efac;
}

.ticket-legal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  width: min(100%, 760px);
  margin: 18px auto 0;
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.45;
  text-align: center;
}

.ticket-legal-footer strong {
  color: var(--text);
  font-weight: 800;
}

.ticket-legal-footer a {
  color: var(--brand-blue);
  font-weight: 800;
  text-decoration: none;
}

.ticket-legal-footer a:hover,
.ticket-legal-footer a:focus {
  color: var(--brand-royal);
  text-decoration: underline;
}

.ticket-legal-footer-dark {
  position: relative;
  z-index: 1;
  justify-content: space-between;
  width: 100%;
  margin-top: 32px;
  color: rgba(222, 232, 255, 0.56);
}

.ticket-panel {
  display: grid;
  align-items: center;
  min-height: 100vh;
  padding: clamp(24px, 5vw, 64px);
}

.ticket-card {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 70px rgba(11, 30, 79, 0.13);
}

.ticket-heading {
  margin-bottom: 24px;
}

.ticket-heading span {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--brand-blue);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ticket-heading h2 {
  margin: 0 0 8px;
  font-family: "Poppins", "Inter", sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  font-weight: 800;
  letter-spacing: 0;
}

.ticket-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-label {
  margin-bottom: 7px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
}

.form-control,
.form-select {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--text);
  background-color: var(--surface-soft);
  font-size: 0.88rem;
  box-shadow: none;
}

textarea.form-control {
  min-height: 132px;
  resize: vertical;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-blue);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(0, 141, 255, 0.1);
}

.ticket-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  font-size: 0.84rem;
  font-weight: 800;
}

.btn-light {
  color: var(--text);
  border-color: var(--border);
  background: #fff;
}

.btn-submit {
  color: #fff;
  border: 0;
  background: linear-gradient(105deg, var(--brand-navy), var(--brand-royal) 70%, var(--brand-blue));
  box-shadow: 0 14px 30px rgba(0, 91, 234, 0.25);
}

.btn-submit:hover,
.btn-submit:focus {
  color: #fff;
  filter: brightness(1.06);
}

.ticket-result {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 20px;
  padding: 14px;
  border-radius: 16px;
  font-size: 0.86rem;
}

.ticket-result span {
  display: grid;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  place-items: center;
}

.ticket-result strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.9rem;
}

.ticket-result p {
  margin: 0;
  line-height: 1.5;
}

.ticket-result.danger {
  border: 1px solid rgba(239, 68, 68, 0.18);
  color: #7f1d1d;
  background: #fff1f2;
}

.portal-ticket-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.portal-ticket-summary > div,
.portal-ticket-block {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(245, 248, 252, 0.82);
}

.portal-ticket-summary > div {
  padding: 13px;
}

.portal-ticket-summary span {
  display: block;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-ticket-summary strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.88rem;
}

.portal-ticket-block {
  margin-top: 14px;
  padding: 16px;
}

.portal-ticket-block h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-family: "Poppins", "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 800;
}

.portal-ticket-block p {
  color: var(--text-muted);
}

.portal-ticket-block small {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.portal-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.portal-timeline {
  display: grid;
  gap: 12px;
}

.portal-timeline-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
}

.portal-timeline-item > span {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  border: 4px solid rgba(0, 141, 255, 0.16);
  border-radius: 999px;
  background: var(--brand-blue);
}

.portal-timeline-item strong,
.portal-message strong {
  display: block;
  color: var(--text);
  font-size: 0.86rem;
}

.portal-timeline-item p,
.portal-message p {
  margin: 3px 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}

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

.portal-message {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.portal-message.ti {
  border-color: rgba(0, 91, 234, 0.18);
  background: rgba(0, 141, 255, 0.07);
}

.ticket-result.success {
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.18);
  background: rgba(16, 185, 129, 0.1);
}

.ticket-result.success span {
  color: #047857;
  background: rgba(16, 185, 129, 0.14);
}

.ticket-result.danger {
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.18);
  background: rgba(239, 68, 68, 0.1);
}

.ticket-result.danger span {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.14);
}

.ticket-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

@media (max-width: 980px) {
  .ticket-shell {
    grid-template-columns: 1fr;
  }

  .ticket-hero {
    min-height: auto;
    padding: 28px 24px;
  }

  .ticket-hero-copy {
    padding: 36px 0 18px;
  }

  .ticket-hero-list {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .ticket-legal-footer-dark {
    justify-content: center;
    margin-top: 24px;
  }

  .ticket-panel {
    min-height: auto;
    padding: 24px;
  }

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

@media (max-width: 560px) {
  .ticket-card {
    padding: 22px;
    border-radius: 20px;
  }

  .ticket-actions {
    flex-direction: column-reverse;
  }

  .ticket-actions .btn {
    width: 100%;
  }

  .portal-ticket-summary,
  .portal-block-head {
    grid-template-columns: 1fr;
  }

  .portal-ticket-summary {
    display: grid;
  }

  .portal-block-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ticket-legal-footer {
    flex-direction: column;
    gap: 5px;
  }
}
