:root {
  --navy: #082f66;
  --blue: #0f5fc5;
  --blue-dark: #0a438f;
  --cyan: #54c7ec;
  --text: #14233b;
  --muted: #66758b;
  --line: #dce5f0;
  --danger: #c9363e;
  --success: #17824b;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--text);
  background: #edf3fa;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(4, 35, 79, .82), rgba(10, 80, 163, .68)),
    url("../images/bg.jpg") center/cover fixed no-repeat;
}

.login-hero {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: 48px clamp(42px, 6vw, 96px);
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(4, 35, 79, .96), rgba(10, 80, 163, .88)),
    url("../images/bg.jpg") center/cover no-repeat;
}

.login-hero::before,
.login-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12);
}

.login-hero::before { width: 520px; height: 520px; right: -210px; top: -170px; }
.login-hero::after { width: 360px; height: 360px; left: -170px; bottom: -160px; }

.back-home {
  position: absolute;
  top: 34px;
  left: clamp(30px, 4vw, 64px);
  z-index: 2;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
  text-decoration: none;
  transition: color .2s, transform .2s;
}

.back-home:hover { color: #fff; transform: translateX(-3px); }

.hero-content {
  position: relative;
  z-index: 1;
  align-self: center;
  width: min(660px, 100%);
}

.hero-logo {
  width: 88px;
  height: 88px;
  margin-bottom: 28px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .25));
}

.hero-kicker, .form-kicker {
  display: block;
  margin-bottom: 14px;
  color: #8edcf7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(38px, 4.4vw, 66px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.hero-content > p {
  max-width: 590px;
  margin: 28px 0 32px;
  color: rgba(255, 255, 255, .78);
  font-size: 17px;
  line-height: 1.7;
}

.hero-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-badges span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  font-size: 13px;
  backdrop-filter: blur(8px);
}

.login-panel {
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  background: transparent;
}

.login-box {
  width: min(440px, 100%);
  padding: 42px 42px 34px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 28px 70px rgba(2,25,60,.32);
  backdrop-filter: blur(16px);
}
.mobile-brand { display: block; margin-bottom: 20px; text-align: center; }
.mobile-brand img { width: 74px; height: 74px; object-fit: contain; }
.form-kicker { color: var(--blue); margin-bottom: 10px; }
.login-box h1 { margin: 0; font-size: 34px; letter-spacing: -.03em; text-align: center; }
.form-description { margin: 10px 0 30px; color: var(--muted); font-size: 14px; line-height: 1.55; text-align: center; }

.login-form { display: flex; flex-direction: column; }
.login-form > label { margin: 0 0 9px; font-size: 14px; font-weight: 700; }
.login-form > label:not(:first-child) { margin-top: 20px; }

.input-field { position: relative; }
.input-field > i {
  position: absolute;
  top: 50%;
  left: 17px;
  color: #8b99ab;
  transform: translateY(-50%);
}

.input-field input {
  width: 100%;
  height: 54px;
  padding: 0 50px 0 48px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: #f9fbfd;
  font-size: 16px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.input-field input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 95, 197, .11);
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #7a889a;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover { color: var(--blue); background: #eaf2fc; }
.login-message { min-height: 22px; margin: 14px 2px 4px; font-size: 13px; line-height: 1.5; }
.login-message.error { color: var(--danger); }
.login-message.success { color: var(--success); }

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 54px;
  margin-top: 8px;
  color: #fff;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 12px 28px rgba(15, 95, 197, .24);
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, opacity .2s;
}

.login-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(15, 95, 197, .3); }
.login-btn:disabled { cursor: wait; opacity: .7; }
.login-btn.is-loading i { animation: pulse-arrow .8s ease-in-out infinite alternate; }

.support-note {
  margin: 25px 0 0;
  color: #7a889a;
  font-size: 13px;
  text-align: center;
}
.support-note i { margin-right: 6px; color: var(--blue); }
.back-dashboard {
  display: block;
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  text-decoration: none;
}
.back-dashboard:hover { color: var(--blue); }
.back-dashboard i { margin-right: 6px; }

@keyframes pulse-arrow { to { transform: translateX(5px); } }

@media (max-width: 900px) {
  .login-page { padding: 22px; }
}

@media (max-width: 480px) {
  .login-page { padding: 14px; }
  .login-box { padding: 34px 24px 28px; border-radius: 18px; }
  .login-box h1 { font-size: 30px; }
  .form-description { margin-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
