:root {
  --login-bg: #f3f6fb;
  --login-ink: #101828;
  --login-muted: #667085;
  --login-panel: rgba(255, 255, 255, 0.92);
  --login-panel-strong: #ffffff;
  --login-border: #d8e0ec;
  --login-line: #e8edf5;
  --login-primary: #1f3a8a;
  --login-primary-strong: #172554;
  --login-accent: #0f766e;
  --login-danger: #dc2626;
  --login-success: #087443;
  --login-shadow: 0 24px 70px rgba(16, 24, 40, 0.14);
}

* {
  box-sizing: border-box;
}

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

body {
  overflow: hidden;
  color: var(--login-ink);
  font-family: "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--login-bg);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
  background:
    linear-gradient(135deg, rgba(31, 58, 138, 0.94), rgba(15, 118, 110, 0.82)),
    url("/image/loginbg_mes.png") center / cover no-repeat;
}

.login-brand {
  position: relative;
  display: flex;
  align-items: stretch;
  min-width: 0;
  color: #fff;
}

.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 17, 42, 0.62), rgba(7, 17, 42, 0.18)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
}

.login-brand__inner {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  padding: clamp(32px, 5vw, 72px);
}

.login-logo {
  width: 156px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
}

.login-logo img {
  display: block;
  max-width: 100%;
  max-height: 46px;
  object-fit: contain;
}

.login-hero {
  max-width: 640px;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 900;
}

.login-hero h1 {
  margin: 18px 0 16px;
  color: #fff;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.12;
  font-weight: 900;
}

.login-hero p {
  width: min(560px, 100%);
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  line-height: 1.72;
  font-weight: 600;
}

.login-security-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.login-security-card {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.login-security-card strong {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.login-security-card span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  line-height: 1.58;
  font-weight: 600;
}

.login-panel {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(22px, 4vw, 54px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 249, 253, 0.96));
}

.login-card {
  width: min(430px, 100%);
  padding: 30px;
  border: 1px solid var(--login-border);
  border-radius: 10px;
  background: var(--login-panel);
  box-shadow: var(--login-shadow);
}

.login-card__head {
  margin-bottom: 24px;
}

.login-card__head span {
  color: var(--login-accent);
  font-size: 12px;
  font-weight: 900;
}

.login-card__head h2 {
  margin: 8px 0 8px;
  color: var(--login-ink);
  font-size: 28px;
  line-height: 1.2;
  font-weight: 900;
}

.login-card__head p {
  margin: 0;
  color: var(--login-muted);
  font-size: 13px;
  line-height: 1.65;
  font-weight: 600;
}

.login-message {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.login-message--success {
  border: 1px solid rgba(8, 116, 67, 0.2);
  background: rgba(8, 116, 67, 0.08);
  color: var(--login-success);
}

.login-form {
  display: grid;
  gap: 15px;
}

.login-field {
  display: grid;
  gap: 8px;
  margin: 0;
}

.login-field > span:first-child {
  color: var(--login-ink);
  font-size: 13px;
  font-weight: 900;
}

.login-field input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid var(--login-border);
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: var(--login-ink);
  font-size: 14px;
  font-weight: 700;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.login-field input:focus {
  border-color: rgba(31, 58, 138, 0.72);
  box-shadow: 0 0 0 3px rgba(31, 58, 138, 0.12);
}

.login-field input::placeholder {
  color: #9aa4b2;
  font-weight: 600;
}

.login-password-wrap {
  position: relative;
  display: block;
}

.login-password-wrap input {
  padding-right: 70px;
}

.login-password-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  height: 32px;
  min-width: 48px;
  border: 1px solid var(--login-line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--login-primary);
  font-size: 12px;
  font-weight: 900;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
}

.login-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--login-muted);
  font-size: 13px;
  font-weight: 800;
}

.login-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--login-primary);
}

.login-options a {
  color: var(--login-primary);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.login-join-disabled {
  color: var(--login-muted);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.login-submit {
  height: 50px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--login-primary), var(--login-primary-strong));
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(31, 58, 138, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(31, 58, 138, 0.28);
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.75;
  transform: none;
}

.login-note {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--login-line);
  color: var(--login-muted);
  font-size: 12px;
  line-height: 1.6;
}

.login-note strong {
  flex: 0 0 auto;
  color: var(--login-primary);
  font-weight: 900;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(6px);
}

.login-overlay.is-visible {
  display: flex;
}

.login-overlay__card {
  width: min(360px, 100%);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 26px;
  border: 1px solid var(--login-border);
  border-radius: 10px;
  background: #fff;
  color: var(--login-ink);
  text-align: center;
  box-shadow: var(--login-shadow);
}

.login-overlay__card strong {
  font-size: 18px;
  font-weight: 900;
}

.login-overlay__card span {
  color: var(--login-muted);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 700;
}

.login-overlay__button {
  min-width: 86px;
  height: 36px;
  margin-top: 8px;
  border: 1px solid var(--login-primary);
  border-radius: 7px;
  background: var(--login-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.login-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(31, 58, 138, 0.18);
  border-top-color: var(--login-primary);
  border-radius: 50%;
  animation: loginSpin 0.8s linear infinite;
}

.login-error-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.1);
  color: var(--login-danger);
  font-size: 20px;
  font-weight: 900;
}

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

@media (max-width: 1100px) {
  .login-page {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  body {
    overflow: auto;
  }

  .login-brand__inner {
    min-height: 430px;
  }

  .login-panel {
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .login-brand__inner {
    min-height: auto;
    padding: 28px 20px;
  }

  .login-hero h1 {
    font-size: 30px;
  }

  .login-security-grid {
    grid-template-columns: 1fr;
  }

  .login-panel {
    padding: 18px;
  }

  .login-card {
    padding: 22px;
  }
}
