:root {
  --ink: #101828;
  --muted: #5b6472;
  --blue: #1e5fa8;
  --green: #168145;
  --gold: #d7aa17;
  --danger: #b42318;
  --line: #dfe5ec;
  --surface: #f5f8fb;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Arial, Helvetica, sans-serif;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
}

.login-hero {
  min-height: 100vh;
  padding: 58px clamp(32px, 6vw, 82px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.16), transparent 18rem),
    radial-gradient(circle at 80% 76%, rgba(28, 155, 82, 0.28), transparent 22rem),
    linear-gradient(135deg, #103b6f 0%, #0f172a 62%, #082016 100%);
}

.login-hero img {
  width: min(390px, 82vw);
  height: 210px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #d8ecff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-hero h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(48px, 7vw, 86px);
  line-height: 0.95;
}

.login-hero p:not(.eyebrow) {
  max-width: 620px;
  margin: 22px 0 0;
  color: #edf6ff;
  font-size: 19px;
  line-height: 1.55;
}

.hero-status {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-status span {
  min-width: 126px;
  padding: 12px 14px;
  color: #eaf6ff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  font-size: 13px;
}

.hero-status strong {
  display: block;
  color: #ffffff;
  font-size: 12px;
  text-transform: uppercase;
}

.login-panel {
  min-height: 100vh;
  padding: 34px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top right, rgba(28, 155, 82, 0.12), transparent 24rem),
    linear-gradient(180deg, #ffffff 0%, #f3f7fb 100%);
}

.login-card {
  width: min(100%, 500px);
  padding: 34px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.14);
  animation: loginFadeUp 380ms ease-out both;
}

.auth-view:not([hidden]) {
  animation: loginViewFade 280ms ease-out both;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
}

.login-brand img {
  width: 92px;
  height: 62px;
  object-fit: contain;
}

.login-copy {
  margin-top: 26px;
}

.login-copy .eyebrow {
  color: var(--blue);
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: 32px;
  line-height: 1.08;
}

.login-copy p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

form {
  margin-top: 26px;
}

label {
  display: block;
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 900;
}

input {
  width: 100%;
  min-height: 56px;
  padding: 12px 15px;
  color: var(--ink);
  background: #ffffff;
  border: 2px solid #cfd8e3;
  border-radius: 8px;
  outline: 0;
  font-size: 18px;
  font-weight: 800;
  transition: border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(30, 95, 168, 0.12);
}

button {
  width: 100%;
  min-height: 56px;
  margin-top: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green), #1a9a55);
  border: 0;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(22, 129, 69, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(22, 129, 69, 0.28);
  filter: brightness(1.02);
}

button:not(:disabled):active {
  transform: translateY(0) scale(0.985);
}

button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.access-status {
  min-height: 48px;
  margin-top: 18px;
  padding: 13px 15px;
  color: #174a83;
  background: #eef6ff;
  border: 1px solid #d4e8ff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
}

.access-status.loading {
  color: #8a6500;
  background: #fff8df;
  border-color: #f3dda2;
}

.access-status.error {
  color: var(--danger);
  background: #fff1f1;
  border-color: #f4c7c7;
}

.access-status.success {
  color: #126a4a;
  background: #ecfdf3;
  border-color: #bdebd0;
}

.back-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease;
}

.back-link:hover {
  transform: translateX(-2px);
}

@keyframes loginFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loginViewFade {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 920px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-hero,
  .login-panel {
    min-height: auto;
  }

  .login-hero {
    padding: 42px 24px;
  }

  .login-hero img {
    height: 160px;
  }
}

@media (max-width: 560px) {
  .login-panel {
    padding: 18px;
  }

  .login-card {
    padding: 24px;
  }

  .login-brand img {
    width: 78px;
    height: 54px;
  }

  h2 {
    font-size: 27px;
  }
}
