@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --brand: #c41212;
  --brand-dark: #9a0e0e;
  --brand-soft: #fff1f1;
  --ink: #101218;
  --ink-2: #1b1e27;
  --text: #1c1f28;
  --muted: #6d7383;
  --line: #e7e5e1;
  --paper: #f4f1ec;
  --card: #ffffff;
  --ok: #157347;
  --danger: #c41212;
  --shadow: 0 24px 60px rgba(16, 18, 24, 0.18);
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body.login-page {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--paper);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.login-shell {
  min-height: 100vh;
  display: flex;
}

.login-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background:
    radial-gradient(700px 320px at 50% 0%, rgba(196, 18, 18, 0.07), transparent 58%),
    var(--paper);
}

.login-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid rgba(16, 18, 24, 0.06);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 36px 32px 28px;
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.login-card-head {
  margin-bottom: 28px;
  text-align: center;
}

.login-card-head h2 {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: -0.03em;
  font-weight: 700;
}

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

.login-alert {
  display: none;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff1f1;
  border: 1px solid #f3c4c4;
  color: #8b1212;
  font-size: 13px;
  line-height: 1.45;
}

.login-alert.is-visible {
  display: block;
}

.login-alert.is-ok {
  background: #edf8f1;
  border-color: #b7e0c5;
  color: #146c3a;
}

.login-forgot {
  display: block;
  text-align: right;
  margin: -4px 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}

.login-forgot:hover {
  text-decoration: underline;
}

.login-back {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.login-back:hover {
  color: var(--brand);
}

.login-field {
  margin-bottom: 14px;
}

.login-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #2a2e39;
}

.login-input {
  position: relative;
}

.login-input i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8b90a0;
  font-size: 18px;
  pointer-events: none;
}

.login-input input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  background: #fbfaf8;
  border-radius: 14px;
  padding: 0 44px 0 42px;
  font: 500 15px/1.2 "Plus Jakarta Sans", sans-serif;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.login-input input:focus {
  background: #fff;
  border-color: #e3b4b4;
  box-shadow: 0 0 0 4px rgba(196, 18, 18, 0.12);
}

.login-input input::placeholder {
  color: #9aa0ae;
  font-weight: 400;
}

.login-toggle-pass {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #6d7383;
  border-radius: 10px;
  cursor: pointer;
}

.login-toggle-pass:hover {
  background: #f2f0eb;
  color: var(--text);
}

.login-captcha {
  margin: 18px 0 8px;
  padding: 14px;
  border-radius: 16px;
  background: #f7f5f1;
  border: 1px solid #ece8e1;
}

.login-captcha-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}

.login-captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

#captcha-image,
#captcha-image img {
  display: block;
  height: 48px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e6e2db;
}

.login-refresh {
  width: 48px;
  height: 48px;
  border: 1px solid #e6e2db;
  background: #fff;
  color: #4b5160;
  border-radius: 12px;
  cursor: pointer;
  flex: 0 0 48px;
}

.login-refresh:hover {
  border-color: #d7b4b4;
  color: var(--brand);
}

.login-submit {
  width: 100%;
  height: 52px;
  margin-top: 10px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #d41818 0%, var(--brand) 100%);
  color: #fff;
  font: 700 15px/1 "Plus Jakarta Sans", sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(196, 18, 18, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.login-submit:hover {
  filter: brightness(1.04);
  box-shadow: 0 14px 26px rgba(196, 18, 18, 0.34);
}

.login-submit:active {
  transform: translateY(1px);
}

.login-submit.is-loading {
  pointer-events: none;
  filter: saturate(0.85);
}

.login-submit.is-loading .login-submit-label {
  opacity: 0.7;
}

.login-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

.login-meta a {
  color: inherit;
  text-decoration: none;
}

.login-meta a:hover {
  color: var(--brand);
}

.help-inline {
  display: block;
  margin-top: 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 920px) {
  .login-panel {
    padding: 24px 16px 32px;
  }

  .login-card {
    box-shadow: 0 10px 30px rgba(16, 18, 24, 0.1);
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 24px 18px 20px;
    border-radius: 20px;
  }
}
