@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --border: #d8e2ee;
  --border-strong: #b8c7d9;
  --text: #111827;
  --muted: #64748b;
  --blue-950: #082f63;
  --blue-900: #123f7c;
  --blue-800: #174a8b;
  --blue-50: #eef6ff;
  --gold: #f4a51c;
  --danger: #c62828;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --shadow: 0 28px 70px rgba(15, 35, 55, 0.18);
  --radius: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(8, 47, 99, 0.08) 0%, rgba(244, 165, 28, 0.08) 42%, rgba(245, 247, 251, 0.96) 100%),
    var(--bg);
  display: grid;
  place-items: center;
  padding: 28px;
}

button,
input {
  font-family: inherit;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.logo svg,
.fg .iw .ico svg,
.btn svg,
.pw-toggle svg,
.note-icon {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-shell {
  width: min(460px, 100%);
  display: block;
  background: linear-gradient(180deg, #ffffff, var(--surface-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.login-shell::before {
  content: "";
  display: block;
  height: 5px;
  background: var(--gold);
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px;
  background: transparent;
}

.card {
  width: 100%;
}

.login-card {
  padding: 4px;
}

.wrap {
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.wrap .card {
  padding: 34px;
  background: linear-gradient(180deg, #ffffff, var(--surface-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.logo {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: var(--blue-50);
  color: var(--blue-800);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7e7fb;
  margin-bottom: 0;
}

.logo svg {
  width: 25px;
  height: 25px;
  stroke-width: 2.2;
}

h2 {
  font-size: 25px;
  font-weight: 800;
  color: var(--blue-950);
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}

h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--blue-950);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.wrap h1,
.wrap .sub {
  text-align: center;
}

.wrap .logo {
  margin-left: auto;
  margin-right: auto;
}

.sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.login-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fg {
  margin-bottom: 15px;
}

.fg label {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.iw {
  position: relative;
}

.ico {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #6b7f99;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ico svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.fg input {
  width: 100%;
  height: 48px;
  padding: 0 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fbfdff;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.fg input::placeholder {
  color: #94a3b8;
}

.fg input:focus {
  border-color: var(--blue-800);
  box-shadow: 0 0 0 4px rgba(23, 74, 139, 0.1);
  background: #ffffff;
}

.pw-toggle {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.pw-toggle:hover {
  background: var(--blue-50);
  color: var(--blue-800);
}

.pw-toggle svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.btn {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue-800), var(--blue-900));
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(23, 74, 139, 0.24);
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
  position: relative;
}

.btn:hover {
  background: var(--blue-900);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(23, 74, 139, 0.28);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.3;
}

.btn.loading {
  color: transparent;
  pointer-events: none;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.err {
  display: none;
  margin-bottom: 16px;
  padding: 11px 12px;
  border: 1px solid var(--danger-border);
  border-radius: var(--radius);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.45;
}

.err.show {
  display: block;
}

.note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.note-icon {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin-top: 3px;
  margin-right: 0;
  color: var(--blue-800);
  vertical-align: -2px;
  stroke-width: 2.1;
}

.note b {
  color: var(--blue-900);
}

.register-link {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.register-link a,
.back {
  color: var(--blue-800);
  font-weight: 700;
  text-decoration: none;
}

.register-link a:hover,
.back:hover {
  text-decoration: underline;
}

.back {
  display: inline-flex;
  justify-content: center;
  align-self: center;
  margin-top: 20px;
  font-size: 13px;
}

@media (max-width: 820px) {
  body {
    padding: 16px;
    display: block;
  }

  .login-shell {
    margin: 0 auto;
  }

  .login-panel {
    padding: 30px 24px;
  }
}

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