/* DurbinPlus Login — Field Terminal */
:root {
  --ink: #102418;
  --fog: rgba(244, 252, 246, 0.9);
  --line: rgba(255, 255, 255, 0.28);
  --mint: #b8e8c4;
  --lime: #9ad66a;
  --deep: #033312;
  --mid: #0a7a2c;
  --ft-danger: #ffffff;
  --ft-danger-bg: #dc2626;
  --ft-ok: #bbf7d0;
  --ft-ok-bg: rgba(20, 83, 45, 0.55);
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Sora", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.ft-body {
  font-family: var(--font-ui);
  color: #fff;
  background: var(--deep);
  -webkit-font-smoothing: antialiased;
}

.ft {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 4vw, 40px);
  background:
    radial-gradient(ellipse 90% 70% at 70% -10%, rgba(154, 214, 106, 0.28), transparent 55%),
    radial-gradient(ellipse 60% 50% at -10% 90%, rgba(10, 122, 44, 0.55), transparent 50%),
    linear-gradient(165deg, #021f0c 0%, #04501a 42%, #0a7a2c 78%, #147a32 100%);
}

.ft__sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.ft__sky svg {
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.ft__grain {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.07;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ft__orb {
  position: absolute;
  width: 42vmax;
  height: 42vmax;
  border-radius: 50%;
  right: -8%;
  bottom: -18%;
  background: radial-gradient(circle, rgba(184, 232, 196, 0.22), transparent 70%);
  z-index: 0;
  animation: ft-drift 14s ease-in-out infinite alternate;
}

.ft__top,
.ft__main,
.ft__bottom {
  position: relative;
  z-index: 1;
}

.ft__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  animation: ft-rise 0.7s ease both;
}

.ft__logo {
  height: 96px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .2));
}

.ft__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 920px;
  padding: 32px 0 24px;
}

.ft__wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
  animation: ft-rise 0.85s ease 0.06s both;
}

.ft__wordmark em {
  font-style: normal;
  color: var(--mint);
}

.ft__headline {
  margin: 22px 0 0;
  max-width: 28ch;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.94);
  animation: ft-rise 0.9s ease 0.12s both;
}

.ft__support {
  margin: 14px 0 0;
  max-width: 42ch;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
  animation: ft-rise 0.95s ease 0.18s both;
}

.ft__terminal {
  margin-top: clamp(28px, 5vh, 48px);
  width: min(100%, 560px);
  animation: ft-rise 1s ease 0.24s both;
}

.ft__terminal-label {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.ft__alerts {
  margin-bottom: 14px;
}

.ft__alert {
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
  border: 1px solid transparent;
}

.ft__alert--error {
  padding: 14px 16px 14px 14px;
  font-size: 14px;
  background: var(--ft-danger-bg);
  color: var(--ft-danger);
  border-color: rgba(255, 255, 255, 0.45);
  border-left: 4px solid #fecaca;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  animation: ft-alert-in 0.45s ease both;
}

@keyframes ft-alert-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ft__alert--success {
  background: var(--ft-ok-bg);
  color: var(--ft-ok);
  border-color: rgba(187, 247, 208, 0.35);
}

.ft__form {
  display: grid;
  gap: 12px;
}

.ft__field {
  position: relative;
}

.ft__field input[type="text"],
.ft__field input[type="password"],
.ft__field input[type="email"] {
  width: 100%;
  height: 54px;
  padding: 0 48px 0 18px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ft__field input::placeholder { color: rgba(255, 255, 255, 0.45); }

.ft__field input:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(184, 232, 196, 0.65);
  box-shadow: 0 0 0 3px rgba(154, 214, 106, 0.18);
}

/* Keep text readable when browser autofill paints a light field */
.ft__field input:-webkit-autofill,
.ft__field input:-webkit-autofill:hover,
.ft__field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #102418;
  caret-color: #102418;
  box-shadow: 0 0 0 1000px #e8f6ec inset;
  border-color: rgba(184, 232, 196, 0.85);
  transition: background-color 99999s ease-out;
}

.ft__field-ico {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.ft__field:has(input:-webkit-autofill) .ft__field-ico,
.ft__field:has(input:-webkit-autofill) .ft__toggle {
  color: #056b20;
  text-shadow: none;
}

.ft__toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.ft__toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.ft__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 4px;
}

.ft__submit {
  appearance: none;
  border: 0;
  height: 52px;
  padding: 0 28px;
  background: #fff;
  color: var(--deep);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: transform 0.18s ease, background 0.18s ease;
}

.ft__submit:hover {
  background: var(--mint);
  transform: translateY(-1px);
}

.ft__link {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 2px;
}

.ft__link:hover { color: #fff; border-bottom-color: #fff; }

.ft__remember {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  user-select: none;
  margin-left: auto;
}

.ft__remember input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  position: relative;
}

.ft__remember input[type="checkbox"]:checked {
  background: var(--lime);
  border-color: var(--lime);
}

.ft__remember input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #033312;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ft__remember input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.ft__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  animation: ft-rise 1.05s ease 0.3s both;
}

.ft__brands {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.ft__brands img {
  height: 42px;
  width: auto;
  max-width: 72px;
  object-fit: contain;
  opacity: 1;
  transition: transform 0.2s ease;
}

.ft__brands img:hover {
  transform: translateY(-2px);
}

.ft__copy {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

@keyframes ft-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ft-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-8%, -6%) scale(1.1); }
}

@keyframes ft-route {
  from { stroke-dashoffset: 420; opacity: 0.2; }
  to { stroke-dashoffset: 0; opacity: 0.7; }
}

.ft__route-path {
  fill: none;
  stroke: rgba(184, 232, 196, 0.55);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 8 10;
  animation: ft-route 3.2s ease-out both;
}

.ft__route-path:nth-child(2) { animation-delay: 0.25s; stroke-opacity: 0.45; }
.ft__route-path:nth-child(3) { animation-delay: 0.45s; stroke-opacity: 0.35; }

.ft__node {
  fill: var(--mint);
  opacity: 0;
  animation: ft-rise 0.6s ease 1.2s both;
}

@media (max-width: 720px) {
  .ft__remember { margin-left: 0; width: 100%; }
  .ft__actions { flex-direction: column; align-items: stretch; }
  .ft__submit { width: 100%; }
  .ft__bottom { flex-direction: column; align-items: flex-start; }
  .ft__wordmark { font-size: clamp(2.1rem, 9vw, 2.8rem); }
  .ft__logo { height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .ft__orb, .ft__top, .ft__wordmark, .ft__headline, .ft__support,
  .ft__terminal, .ft__bottom, .ft__route-path, .ft__node,
  .ft__alert--error {
    animation: none !important;
  }
  .ft__node { opacity: 1; }
}
