@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@500;700;800&family=Source+Sans+3:wght@400;600&display=swap');

/* ===== THEME ===== */
:root {
  --pri: #5b2a86;
  --ink: #1d0b33;
  --acc: #ffb400;
  --tint: #f1eaf8;
  --bg: #f8f4fc;
  --card: #fff;
  --line: #e2d6f0;
  --mut: #6c5a80;
  --bad: #b4402f;
  --ok: #2f8a57;
}

* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 'Source Sans 3', system-ui, sans-serif; background: var(--bg); color: var(--ink); }
h1, h2, h3 { font-family: 'Bricolage Grotesque', system-ui, sans-serif; margin: 0 0 .4em; line-height: 1.1; }
a { color: var(--pri); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }
.mut { color: var(--mut); font-size: 14px; }
.hint { font-size: 13px; color: var(--mut); }

/* brand */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font: 800 20px 'Bricolage Grotesque', sans-serif; line-height: 1.1; }
.brand small { display: block; font: 400 12px 'Source Sans 3'; opacity: .7; }
.logo-img { width: 110px; height: 55px; }

/* client header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top nav { display: flex; gap: 8px; }
.top nav a { padding: 8px 18px; border-radius: 99px; text-decoration: none; font-weight: 600; color: var(--ink); transition: background .15s; }
.top nav a.on { background: var(--tint); color: var(--pri); }
.top nav a.cta { background: #25a244; color: #fff; box-shadow: 0 2px 8px rgba(37, 162, 68, .25); }

main { max-width: 1120px; margin: 0 auto; padding: 22px 16px 70px; min-height: 72vh; }
footer { background: var(--ink); color: #cdb8e6; padding: 35px 16px; text-align: center; font-size: 14px; }

/* art container */
.art { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .35s ease; }

/* intro */
.intro { padding: 32px 0 12px; }
.intro h1 { font-size: clamp(34px, 7vw, 64px); letter-spacing: -.02em; max-width: 14ch; color: var(--ink); }
.intro p { max-width: 52ch; color: var(--mut); font-size: 18px; margin: 8px 0 0; }

/* destination cards */
.filters { margin: 12px 0 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.dest {
  position: relative;
  height: 240px;
  border-radius: 20px;
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: #fff;
  transition: transform .25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow .25s ease;
  box-shadow: 0 8px 20px rgba(29, 11, 51, .12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dest:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(29, 11, 51, .24);
}

.dest:hover .art {
  transform: scale(1.05);
}

.dest::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(29, 11, 51, 0.05) 0%, rgba(29, 11, 51, 0.35) 45%, rgba(29, 11, 51, 0.92) 100%);
  pointer-events: none;
}

.dest .tx {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  bottom: 18px;
}
.dest h3 {
  font-size: 28px;
  margin: 0;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.dest p {
  margin: 4px 0 0;
  font-size: 14px;
  opacity: .95;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.dest .pill {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-weight: 700;
  border-radius: 99px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* modern arrow badge replacing empty top right */
.dest-arrow {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: transform .25s ease, background .25s;
}
.dest:hover .dest-arrow {
  background: var(--acc);
  color: var(--ink);
  transform: translate(2px, -2px);
  border-color: var(--acc);
}

/* hero + boarding pass */
.hero { position: relative; overflow: hidden; border-radius: 22px; min-height: 300px; color: #fff; display: flex; align-items: flex-end; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 20%, rgba(29,11,51,.85)); }
.hero .hin { position: relative; z-index: 1; padding: 26px 26px 56px; max-width: 700px; }
.hero h1 { font-size: clamp(40px, 8vw, 82px); letter-spacing: -.025em; margin: 0; }
.hero p { margin: 6px 0 0; font-size: 18px; opacity: .95; }

/* country badge */
.stamp {
  position: absolute;
  z-index: 2;
  right: 22px;
  top: 22px;
  padding: 10px 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  text-align: center;
  font: 700 13px/1.3 'Bricolage Grotesque';
  background: rgba(29, 11, 51, 0.45);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.plane { position: absolute; z-index: 2; left: 4%; top: 72%; font-size: 30px; }
@media (prefers-reduced-motion: no-preference) {
  .plane { animation: fly 2.6s ease-out forwards; }
  @keyframes fly { to { left: 86%; top: 10%; opacity: 0; transform: rotate(-20deg); } }
}
@media (prefers-reduced-motion: reduce) {
  .plane { display: none; }
}

.pass { position: relative; z-index: 3; display: flex; flex-wrap: wrap; background: #fff; border-radius: 16px; margin: -36px 18px 20px; box-shadow: 0 10px 28px rgba(29,11,51,.18); }
.pass > div { flex: 1; min-width: 130px; padding: 14px 20px; border-left: 2px dashed var(--line); }
.pass > div:first-child { border: 0; }
.pass small { display: block; color: var(--mut); font-size: 13px; }
.pass b { font: 700 20px 'Bricolage Grotesque'; }

/* sub nav */
.sub { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; align-items: center; margin-bottom: 10px; }
.sub a { padding: 9px 16px; border-radius: 99px; background: #fff; border: 1px solid var(--line); white-space: nowrap; text-decoration: none; font-weight: 600; color: var(--ink); }
.sub a.on { background: var(--pri); border-color: var(--pri); color: #fff; }
.sub select { margin-left: auto; width: auto; min-width: 150px; }

/* generic elements */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: 0 2px 6px rgba(29,11,51,.04); }
.card h3 { font-size: 19px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; position: relative; overflow: hidden; }
.stat b { font: 800 28px 'Bricolage Grotesque'; display: block; position: relative; }
.stat span { color: var(--mut); font-size: 14px; position: relative; }
.star { color: var(--acc); letter-spacing: 1px; }

.pill { display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 99px; background: var(--tint); color: var(--pri); margin: 0 4px 4px 0; }
.pill.ok { background: #dff1e6; color: var(--ok); }
.pill.bad { background: #f7dfda; color: var(--bad); }
.pill.warn { background: #fbecd0; color: #8a5a0a; }

ul.l { padding-left: 18px; margin: 6px 0; }
ul.l li { margin-bottom: 5px; }
.two { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.bar { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 15px; }
.bar .t { flex: 1; background: var(--tint); border-radius: 6px; }
.bar i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--pri), #9b5de5); }
.bar span:first-child { width: 110px; }
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; margin-top: 8px; }
.months span { text-align: center; font-size: 13px; padding: 8px 0; border-radius: 8px; background: var(--tint); color: var(--mut); }
.months .pk { background: var(--acc); color: var(--ink); font-weight: 700; }

/* itinerary */
.day { position: relative; display: flex; gap: 14px; padding: 0 0 18px 26px; border-left: 3px dotted var(--line); margin-left: 8px; }
.day:last-child { border-color: transparent; padding-bottom: 0; }
.day::before { content: ""; position: absolute; left: -10px; top: 2px; width: 16px; height: 16px; border-radius: 6px; background: var(--acc); border: 3px solid var(--pri); }
.day em { font: 700 16px 'Bricolage Grotesque'; font-style: normal; color: var(--pri); min-width: 58px; }

/* resort cards */
.rs { padding: 0; overflow: hidden; }
.rs .ph { position: relative; height: 130px; }
.rs .ph .pill { position: absolute; top: 10px; left: 10px; z-index: 2; background: rgba(255, 255, 255, 0.9); color: var(--ink); }
.rs .pr { position: absolute; z-index: 2; right: 10px; bottom: 10px; background: #fff; border-radius: 10px; padding: 4px 12px; font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.rs .bd { padding: 16px 18px 18px; }
.rs h3 { margin-bottom: 2px; }

/* transport tickets */
.ticket { position: relative; display: flex; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ticket .tk { width: 92px; flex: none; background: var(--pri); color: #fff; display: grid; place-items: center; text-align: center; padding: 12px 6px; font-weight: 600; font-size: 14px; border-right: 2px dashed rgba(255,255,255,.5); }
.ticket .tk span { display: block; font-size: 30px; }
.ticket .tb { padding: 14px 18px; }

.empty { text-align: center; padding: 50px 16px; color: var(--mut); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--mut); font-weight: 600; }
.scroll { overflow-x: auto; }
form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
form label { display: block; font-size: 14px; color: var(--mut); }
form .full { grid-column: 1/-1; }
input, select, textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-top: 3px; }
textarea { min-height: 76px; resize: vertical; }
.btn { display: inline-block; background: var(--pri); color: #fff; border: 0; padding: 10px 20px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.btn.alt { background: var(--tint); color: var(--pri); }
.btn.del { background: #f7dfda; color: var(--bad); }
.btn.sm { padding: 5px 12px; font-size: 14px; }
.chip { border: 1px solid var(--line); background: #fff; padding: 9px 18px; border-radius: 99px; margin: 0 4px 6px 0; font-weight: 600; transition: all .15s; }
.chip.on { background: var(--pri); color: #fff; border-color: var(--pri); }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }

/* admin shell */
body[data-area=admin] { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
body[data-area=admin] footer { display: none; }
body[data-area=admin] main { width: 100%; max-width: 1100px; margin: 0; }
.side { position: sticky; top: 0; height: 100vh; background: var(--ink); color: #fff; padding: 20px 14px; display: flex; flex-direction: column; gap: 6px; }
.side .brand { margin: 0 6px 22px; }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side nav a { display: flex; gap: 10px; padding: 11px 14px; border-radius: 12px; text-decoration: none; color: #d9c9ec; font-weight: 600; }
.side nav a.on { background: var(--acc); color: var(--ink); }
.side nav a:hover:not(.on) { background: rgba(255,255,255,.08); }
.side .so { margin-top: auto; padding: 11px 14px; border-radius: 12px; background: rgba(255,255,255,.08); color: #fff; text-decoration: none; text-align: center; }
body[data-area=admin] h2 { font-size: 32px; }

/* ========================================================
   ENHANCED LOGIN EXPERIENCE
   ======================================================== */

body[data-page="login"] {
  background: radial-gradient(circle at 50% 18%, #ffffff 0%, var(--bg) 60%, #ece1f7 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body[data-page="login"] #nav {
  display: none;
}

body[data-page="login"] footer {
  display: none;
}

body[data-page="login"] main {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 16px;
  min-height: auto;
}

.login-wrapper {
  position: relative;
  width: 100%;
}

/* Floating Travel Orbit Motifs */
.floating-orbit {
  position: absolute;
  inset: -50px -70px;
  pointer-events: none;
  z-index: 0;
}

.float-item {
  position: absolute;
  font-size: 28px;
  filter: drop-shadow(0 6px 14px rgba(29, 11, 51, 0.14));
  opacity: 0.8;
  animation: travelFloat 6s ease-in-out infinite alternate;
}

.fl-1 { top: 2%; left: 8%; animation-delay: 0s; }
.fl-2 { top: 12%; right: 4%; animation-delay: 1.4s; font-size: 32px; }
.fl-3 { bottom: 20%; left: -2%; animation-delay: 2.2s; }
.fl-4 { bottom: 10%; right: 6%; animation-delay: 3.1s; }
.fl-5 { top: 48%; left: -6%; animation-delay: 0.9s; }

@keyframes travelFloat {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(8deg); }
  100% { transform: translateY(8px) rotate(-6deg); }
}

/* Centered Brand Header */
.login-brand-center {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 22px;
}

.login-brand-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(91, 42, 134, 0.16));
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 5px 14px;
  border-radius: 99px;
  background: #fff;
  border: 1px solid var(--line);
  font: 700 11px/1 'Bricolage Grotesque', sans-serif;
  letter-spacing: 0.08em;
  color: var(--pri);
  box-shadow: 0 4px 12px rgba(29, 11, 51, 0.05);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--ok);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(47, 138, 87, 0.6);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(47, 138, 87, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(47, 138, 87, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(47, 138, 87, 0); }
}

/* Boarding-card Login Card */
.login-card {
  position: relative;
  z-index: 2;
  padding: 0;
  border-radius: 22px;
  box-shadow: 0 20px 48px -10px rgba(29, 11, 51, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.85);
  overflow: hidden;
  background: #fff;
}

.card-flight-header {
  position: relative;
  height: 120px;
  overflow: hidden;
}

.flight-flightpath {
  position: absolute;
  bottom: 28px;
  left: 24px;
  right: 24px;
  height: 2px;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flight-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.flight-plane {
  color: #fff;
  font-size: 16px;
  animation: flyAlong 4s ease-in-out infinite alternate;
  transform: translateY(-1px);
}

@keyframes flyAlong {
  0% { transform: translateX(-40px) scale(0.92); }
  100% { transform: translateX(40px) scale(1.08); }
}

.flight-code-row {
  position: absolute;
  bottom: 7px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Form Body */
.card-body {
  padding: 26px 28px 24px;
}

.welcome-text h3 {
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 4px;
}

.welcome-text p {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 14px;
}

.login-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.pin-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.pin-input-wrap .input-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  pointer-events: none;
  opacity: 0.65;
}

.pin-input-wrap input {
  padding: 12px 14px 12px 42px;
  font-size: 18px;
  letter-spacing: 0.22em;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  margin-top: 0;
}

.pin-input-wrap input:focus {
  background: #fff;
  border-color: var(--pri);
  box-shadow: 0 0 0 4px rgba(91, 42, 134, 0.12);
  outline: none;
}

.login-error {
  min-height: 20px;
  margin: 6px 0 0;
  color: var(--bad);
  font-weight: 600;
}

/* Button & Actions */
.btn-login {
  width: 100%;
  margin-top: 14px;
  padding: 13px 20px;
  font-size: 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--pri), #7b39b5);
  box-shadow: 0 6px 18px rgba(91, 42, 134, 0.28);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(91, 42, 134, 0.36);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login .arrow-ico {
  transition: transform 0.2s ease;
}

.btn-login:hover .arrow-ico {
  transform: translateX(4px);
}

.login-footer-meta {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: var(--mut);
}

/* Shake Animation for Incorrect PIN */
.shake {
  animation: shake 0.45s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Responsive Breakpoints */
@media (max-width: 800px) {
  body[data-area=admin] { display: block; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side .brand { margin: 0 10px 0 0; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .side .so { margin: 0 0 0 auto; }
}

@media (max-width: 600px) {
  .months { grid-template-columns: repeat(6, 1fr); }
  .pass { margin: -30px 8px 16px; }
  .stamp { padding: 6px 12px; font-size: 11px; }
  .floating-orbit { display: none; }
  .login-card { border-radius: 18px; }
  .card-body { padding: 20px 18px; }
  .login-brand-logo { height: 56px; }
}