/* ==============================
   CC EZYTEC - Ticket de Entrada
   Estilo: Boarding Pass
   Mobile-first: cabe en una sola pantalla
   Colores: #8800ff, #febd04
   Fuentes: Visby (títulos), Roboto (cuerpo)
   ============================== */

@font-face {
  font-family: 'Visby';
  src: local('Visby CF Bold'), local('VisbyCF-Bold'), local('Visby Bold');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Visby';
  src: local('Visby CF Medium'), local('VisbyCF-Medium'), local('Visby Medium');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --purple: #8800ff;
  --purple-light: #f3ecff;
  --yellow: #febd04;
  --bg: #e8e4ec;
  --white: #ffffff;
  --gray-300: #d4d0d8;
  --gray-400: #b5b0b8;
  --gray-500: #9e9e9e;
  --gray-700: #555555;
  --gray-900: #2d2d2d;
  --font-heading: 'Visby', 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Roboto', 'Segoe UI', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  color: var(--gray-900);
  -webkit-font-smoothing: antialiased;
}

/* ======== TICKET CONTAINER ======== */
.ticket {
  width: 100%;
  max-width: 390px;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08))
          drop-shadow(0 16px 40px rgba(0, 0, 0, 0.06));
}

/* ======== HEADER ======== */
.ticket-header {
  background: var(--purple);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.header-title {
  flex: 1;
}

.title {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1.5px;
  line-height: 1.2;
}

.subtitle {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 2px;
}

/* ======== BODY: datos + QR lado a lado ======== */
.ticket-body {
  display: flex;
  padding: 24px 20px;
  gap: 16px;
  align-items: flex-start;
}

/* ---- Campos de datos ---- */
.fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.field {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  border-bottom: 1px solid #f0eef2;
}

.field:last-child {
  border-bottom: none;
}

.field--highlight {
  margin-top: 4px;
  padding: 10px 12px;
  background: transparent;
  border-radius: 0;
  border-bottom: none;
}

.field-label {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.field-value {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-900);
}

.field-value--bold {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 3px;
  color: var(--purple);
}

/* ---- QR Section ---- */
.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.qr-box {
  padding: 6px;
  background: var(--white);
  border: 1px solid #f0eef2;
  border-radius: 8px;
  display: inline-flex;
}

.qr-box img {
  display: block;
  border-radius: 4px;
}

.pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--purple-light);
  border-radius: 8px;
  padding: 6px 10px;
}

.pin-label {
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 400;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  max-width: 120px;
  line-height: 1.3;
}

.pin-value {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 3px;
}

/* ---- Foto del vehículo ---- */
.vehicle-photo {
  padding: 0 20px 16px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.vehicle-photo-label {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.vehicle-photo-frame {
  width: 100%;
  max-width: 160px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #f0eef2;
}

.vehicle-photo-frame img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ---- Troquel / corte ---- */
.ticket-cut {
  display: flex;
  align-items: center;
  position: relative;
  height: 20px;
  background: var(--white);
}

.notch {
  width: 20px;
  height: 20px;
  background: var(--bg);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.notch--left {
  margin-left: -10px;
}

.notch--right {
  margin-right: -10px;
}

.cut-line {
  flex: 1;
  border-top: 2px dashed var(--gray-300);
}

/* ======== FOOTER ======== */
.ticket-footer {
  padding: 14px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.info-text {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--gray-400);
  text-align: center;
}

/* ======== BOTÓN ======== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 90%;
  border-radius: 999px;
  font-family: var(--font-body);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
}

.btn--primary {
  background: var(--yellow);
  color: var(--purple);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 14px 24px;
  box-shadow:
    0 3px 6px rgba(254, 189, 4, 0.25),
    0 10px 28px rgba(254, 189, 4, 0.35);
}

.btn--primary:hover {
  background: #f5b400;
  transform: translateY(-2px);
  box-shadow:
    0 5px 10px rgba(254, 189, 4, 0.3),
    0 14px 36px rgba(254, 189, 4, 0.45);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow:
    0 2px 4px rgba(254, 189, 4, 0.2),
    0 6px 16px rgba(254, 189, 4, 0.3);
}

.btn--primary strong {
  font-family: var(--font-heading);
  font-weight: 700;
}

/* ---- Póliza (texto, no botón) ---- */
.poliza-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--gray-500);
}

.poliza-text strong {
  font-weight: 500;
}

.btn-shield {
  flex-shrink: 0;
  color: var(--gray-400);
}

/* ---- Logo footer ---- */
.footer {
  margin-top: 0;
  display: flex;
  justify-content: center;
}

.footer-logo {
  height: 28px;
  width: auto;
  opacity: 0.35;
  transition: opacity 0.2s;
}

.footer-logo:hover {
  opacity: 0.35;
}

/* ======== PANTALLAS PEQUEÑAS ======== */
@media (max-height: 680px) {
  body {
    padding: 8px;
  }

  .ticket-header {
    padding: 12px 16px;
  }

  .logo-img {
    height: 28px;
  }

  .title {
    font-size: 0.85rem;
  }

  .ticket-body {
    padding: 14px 16px;
    gap: 12px;
  }

  .field {
    padding: 6px 0;
  }

  .field--highlight {
    padding: 8px 10px;
  }

  .qr-box img {
    width: 100px;
    height: 100px;
  }

  .pin-value {
    font-size: 0.95rem;
  }

  .ticket-footer {
    padding: 10px 16px 14px;
    gap: 8px;
  }

  .btn--primary {
    padding: 12px 20px;
    font-size: 0.9rem;
  }
}
