:root {
  color-scheme: light;
  --navy: #0e232d;
  --blue: #0b7fcf;
  --blue-dark: #165a96;
  --blue-soft: #d4eaf9;
  --blue-faint: #e8f5ff;
  --text: #0e232d;
  --muted: #4a7a94;
  --border: #c0dff2;
  --danger: #b94242;
  --danger-bg: #fff0f0;
  --font: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  background:
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    linear-gradient(180deg, #dbe7ef 0%, #eaf2f7 100%);
  color: var(--text);
  font: 400 15px/1.5 var(--font);
}

.login-header {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 0 24px;
  background: var(--navy);
  color: white;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  width: 56px;
  height: auto;
  flex: 0 0 auto;
  filter: brightness(0) invert(1);
}

.brand-context {
  padding-left: 10px;
  border-left: 1px solid rgba(155, 193, 212, 0.35);
  color: #9bc1d4;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.login-main {
  display: grid;
  min-height: calc(100vh - 72px);
  padding: 40px 20px;
  place-items: center;
}

.login-card {
  width: min(420px, 100%);
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 46px rgba(14, 35, 45, 0.1);
  animation: card-in 280ms both ease-out;
}

.card-heading {
  margin-bottom: 25px;
}

.card-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
}

.card-icon svg {
  width: 22px;
  fill: currentColor;
}

h1 {
  margin: 0;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.card-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.login-error {
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid #efc3c3;
  border-radius: 8px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
}

.login-error[hidden] {
  display: none;
}

form {
  display: grid;
  gap: 16px;
}

label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  background: var(--blue-faint);
  color: var(--text);
  font: 15px var(--font);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:hover {
  border-color: #94c8e8;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 127, 207, 0.1);
}

button {
  height: 44px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font: 600 15px var(--font);
  transition: background 150ms ease;
}

button:hover {
  background: var(--blue-dark);
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(11, 127, 207, 0.28);
  outline-offset: 2px;
}

.access-note {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid #dbeaf3;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}

@media (max-width: 520px) {
  .login-header {
    min-height: 64px;
    padding: 0 16px;
  }

  .brand-logo {
    width: 50px;
  }

  .login-main {
    min-height: calc(100vh - 64px);
    padding: 24px 12px;
  }

  .login-card {
    padding: 25px 20px;
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
