:root {
  --navy: #102b68;
  --royal: #1c4e9b;
  --cyan: #09b5e5;
  --magenta: #d54d8f;
  --ink: #17213d;
  --muted: #758099;
  --white: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  min-width: 320px;
  color: var(--ink);
  background: #dbe9f4;
  font-family: Montserrat, Arial, sans-serif;
}

button, input { font: inherit; }
a { color: inherit; }

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 88px minmax(640px, 1fr) 46px;
}

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  color: white;
  background:
    linear-gradient(100deg, rgba(6, 39, 99, .98) 0%, rgba(38, 60, 131, .97) 47%, rgba(184, 62, 126, .96) 100%);
  box-shadow: 0 4px 22px rgba(22, 40, 85, .18);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), rgba(255,255,255,.7), var(--magenta));
}

.site-header p {
  position: absolute;
  right: 34px;
  margin: 0;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .18em;
  opacity: .72;
}

.logo-crop {
  position: relative;
  overflow: hidden;
}

.logo-crop img {
  position: absolute;
  max-width: none;
  pointer-events: none;
  user-select: none;
}

.header-logo {
  width: 315px;
  height: 72px;
}

.header-logo img {
  width: 430px;
  left: -58px;
  top: -99px;
}

.login-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 640px;
  padding: 46px 24px 54px;
  overflow: hidden;
  background: url("assets/air-montenegro-aircraft.jpg") center 46% / cover no-repeat;
}

.login-stage::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(235, 246, 253, .18), rgba(220, 236, 247, .05) 48%, rgba(227, 239, 247, .35)),
    radial-gradient(circle at 50% 50%, transparent 16%, rgba(19, 42, 83, .13) 100%);
}

.image-shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  backdrop-filter: blur(1.5px);
}

.login-card {
  width: min(100%, 430px);
  padding: 28px 42px 26px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(24, 68, 148, .94) 0%, rgba(38, 76, 153, .88) 35%, rgba(208, 73, 139, .82) 100%);
  box-shadow:
    0 28px 70px rgba(18, 37, 78, .33),
    inset 0 1px 0 rgba(255,255,255,.24);
  backdrop-filter: blur(18px);
}

.card-brand {
  width: 244px;
  height: 118px;
  margin: -10px auto 2px;
}

.card-brand img {
  width: 405px;
  left: -80px;
  top: -94px;
}

.heading {
  margin-bottom: 20px;
  text-align: center;
  color: white;
}

.heading p {
  margin: 0 0 7px;
  color: rgba(255,255,255,.72);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .18em;
}

.heading h1 {
  margin: 0 0 5px;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.025em;
}

.heading span {
  color: rgba(255,255,255,.75);
  font-size: 11px;
}

form > label, .password-label label {
  display: block;
  margin: 0 0 7px;
  color: rgba(255,255,255,.9);
  font-size: 10px;
  font-weight: 600;
}

.password-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
}

.password-label label { margin: 0 0 7px; }
.show-password {
  margin-bottom: 7px;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(255,255,255,.75);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .12em;
  cursor: pointer;
}

.input-wrap { position: relative; }

.field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #a9b2c1;
  font-weight: 600;
  font-size: 16px;
}

.field-icon.lock {
  font-size: 9px;
  box-shadow: inset 0 0 0 2px #a9b2c1;
  width: 15px;
  height: 14px;
  border-radius: 2px;
  color: #a9b2c1;
  line-height: 9px;
  text-align: center;
}

.field-icon.lock::before {
  content: "";
  position: absolute;
  width: 9px;
  height: 8px;
  left: 3px;
  top: -7px;
  border: 2px solid #a9b2c1;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}

.input-wrap input {
  width: 100%;
  height: 50px;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 8px;
  outline: none;
  padding: 0 16px 0 46px;
  color: #263453;
  background: rgba(255,255,255,.96);
  box-shadow: 0 5px 13px rgba(23,45,91,.08);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.input-wrap input::placeholder { color: #aeb6c4; }
.input-wrap input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(2, 185, 231, .24), 0 8px 18px rgba(20,44,93,.14);
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 15px 0 18px;
  color: rgba(255,255,255,.85);
  font-size: 9px;
}

.form-options a { font-weight: 600; text-underline-offset: 3px; }
.remember { display: flex; align-items: center; gap: 7px; }
.remember input { accent-color: var(--cyan); }

.submit-button {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: white;
  background: linear-gradient(100deg, #0d4baa 0%, #274eaa 44%, #d0478e 100%);
  box-shadow: 0 9px 20px rgba(12,45,105,.25);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s, filter .2s, box-shadow .2s;
}

.submit-button > span:last-child { font-size: 20px; font-weight: 400; }
.submit-button:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 12px 24px rgba(12,45,105,.3); }
.submit-button:disabled { opacity: .7; cursor: wait; transform: none; }

.form-message {
  margin: 12px 0 0;
  padding: 9px 11px;
  border-radius: 6px;
  color: #7d203a;
  background: rgba(255,234,241,.95);
  font-size: 9px;
  line-height: 1.5;
}

.form-message.success { color: #124f53; background: rgba(222,252,250,.95); }

.security-note {
  margin: 17px 0 0;
  text-align: center;
  color: rgba(255,255,255,.68);
  font-size: 8px;
  letter-spacing: .04em;
}

.security-note span { color: #83e3f7; margin-right: 4px; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 34px;
  color: #7c87a0;
  background: rgba(248, 251, 254, .98);
  font-size: 9px;
}

.site-footer a { color: var(--navy); text-decoration: none; font-weight: 600; }

@media (max-width: 760px) {
  .page-shell { grid-template-rows: 72px minmax(calc(100vh - 110px), 610px) 38px; }
  .site-header { justify-content: flex-start; padding-inline: 16px; }
  .site-header p { right: 16px; font-size: 7px; }
  .header-logo { width: 216px; height: 62px; }
  .header-logo img { width: 330px; left: -57px; top: -74px; }
  .login-stage { min-height: 610px; padding: 30px 18px; background-position: 57% center; }
  .login-card { width: min(100%, 390px); padding: 25px 28px 23px; }
  .site-footer { justify-content: center; padding-inline: 16px; }
  .site-footer span:nth-child(2) { display: none; }
}

@media (max-width: 460px) {
  .site-header p { display: none; }
  .login-stage { background-position: 61% center; }
  .card-brand { width: 220px; }
  .form-options { gap: 18px; }
  .site-footer { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
