:root {
  --navy: #173b68;
  --blue: #0759ae;
  --blue-dark: #084987;
  --muted: #63758b;
  --border: #dbe5ef;
  --focus: #c8e0fa;
  --error: #b42318;
  --error-background: #fef3f2;
  --success: #067647;
  --success-background: #ecfdf3;
}

* {
  box-sizing: border-box;
}

body {
  display: grid;
  min-height: 100vh;
  margin: 0;
  padding: 32px 16px;
  place-items: center;
  color: #22364f;
  background: radial-gradient(circle at 12% 85%, rgba(74, 145, 222, 0.42) 0, transparent 38%), linear-gradient(135deg, #0759ae, #123c70);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.login-card {
  width: min(90%, 610px);
  padding: 38px 42px 28px;
  border: 1px solid #e5edf5;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(8, 37, 70, 0.22), 0 4px 18px rgba(23, 59, 104, 0.08);
}

.brand {
  margin-bottom: 29px;
  text-align: center;
}

.brand-icon {
  display: grid;
  width: 76px;
  height: 76px;
  margin: 0 auto 19px;
  border-radius: 21px;
  place-items: center;
  color: var(--blue);
  background: linear-gradient(145deg, #e5f1ff, #d4e7fc);
  box-shadow: inset 0 0 0 1px #d1e4f8;
}

.brand-icon svg {
  width: 48px;
  height: 48px;
  fill: currentColor;
}

.brand-icon .folder {
  fill: #fff;
}

h1 {
  margin: 0;
  color: var(--navy);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: 0.35px;
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.notice {
  margin: 0 0 18px;
  padding: 11px 13px;
  border: 1px solid;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.5;
}

.notice-error {
  border-color: #fecdca;
  color: var(--error);
  background: var(--error-background);
}

.notice-success {
  border-color: #abefc6;
  color: var(--success);
  background: var(--success-background);
}

.field {
  margin-bottom: 19px;
}

.field label {
  display: block;
  margin-bottom: 9px;
  color: #344961;
  font-size: 13px;
  font-weight: 650;
}

.control {
  position: relative;
}

.control input {
  width: 100%;
  height: 49px;
  padding: 0 47px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: 0;
  color: #1e3550;
  background: #fbfdff;
  font: 500 13.5px Inter, "Segoe UI", Arial, sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.control input:focus {
  border-color: #3181ce;
  background: #fff;
  box-shadow: 0 0 0 4px var(--focus);
}

.control input::placeholder {
  color: #96a5b5;
}

.field-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 17px;
  width: 16px;
  height: 16px;
  fill: #6482a3;
  transform: translateY(-50%);
  pointer-events: none;
}

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

.password-toggle:hover {
  color: var(--blue);
  background: #eaf3ff;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.password-toggle .eye-closed,
.password-toggle[aria-pressed="true"] .eye-open {
  display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
  display: block;
}

.actions {
  display: grid;
  gap: 11px;
  margin-top: 25px;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 49px;
  padding: 0 16px;
  border: 1px solid var(--blue);
  border-radius: 10px;
  font: 700 13px Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.4px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(0, 86, 179, 0.18);
}

.button svg {
  width: 17px;
  height: 17px;
  margin-right: 9px;
  fill: currentColor;
}

.button-primary {
  color: #fff;
  background: var(--blue);
}

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

.button-secondary {
  color: var(--blue);
  background: #f5f9fe;
}

.button-secondary:hover {
  background: #e7f1fc;
}

.footer {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 28px;
  padding-top: 19px;
  border-top: 1px solid #e9eef4;
  color: #7b899a;
  font-size: 10.5px;
  line-height: 1.65;
}

.footer svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  fill: #6b8eb1;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #78b5f5;
  outline-offset: 2px;
}

@media (max-width: 540px) {
  body {
    padding: 16px 12px;
  }

  .login-card {
    padding: 28px 22px 23px;
    border-radius: 16px;
  }

  h1 {
    font-size: 17px;
  }

  .brand-icon {
    width: 67px;
    height: 67px;
  }

  .brand-icon svg {
    width: 42px;
    height: 42px;
  }
}

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