* {
  box-sizing: border-box;
}

:root {
  --page-bg: #ffede1;
  --panel: #ffffff;
  --ink: #201f30;
  --muted: rgba(32, 31, 48, 0.54);
  --line: #ffceae;
  --primary: #f47458;
  --primary-dark: #dc5f46;
  --blue: #0e60ff;
  --success: #147c4b;
  --success-bg: #edf9f2;
  --error: #b42318;
  --error-bg: #fff0ec;
  --shadow: 0 19px 40px rgba(32, 31, 48, 0.05);
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--page-bg);
}

button,
input {
  font: inherit;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(620px, 60.7vw) minmax(430px, 1fr);
  overflow: hidden;
  background: var(--page-bg);
}

.login-stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(30px, 5vh, 78px) clamp(32px, 4vw, 64px);
  background: var(--panel);
}

.login-stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 72px;
  height: 1px;
  background: var(--line);
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(100%, clamp(500px, 39vw, 598px));
  min-height: min(690px, calc(100vh - 120px));
  padding: clamp(58px, 7vh, 76px) clamp(52px, 5.2vw, 64px) clamp(46px, 5.4vh, 64px);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.card-logo {
  margin: 0 0 clamp(46px, 7vh, 64px);
  color: var(--primary);
  font-size: clamp(24px, 2vw, 32px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: 0;
}

.welcome-line {
  margin: 0 0 18px;
  color: rgba(0, 0, 0, 0.5);
  font-size: 15px;
  line-height: 1.6;
}

.login-card h1 {
  max-width: 360px;
  margin: 0 0 clamp(34px, 5vh, 54px);
  color: #000000;
  font-size: clamp(48px, 4vw, 58px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form label:not(.remember-row) {
  color: #000000;
  font-size: 15px;
  font-weight: 500;
}

.input-box {
  height: 48px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 237, 225, 0.46);
}

.input-box:focus-within {
  box-shadow: 0 0 0 3px rgba(244, 116, 88, 0.16);
}

.input-box input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 18px;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
}

.input-box input::placeholder {
  color: rgba(32, 31, 48, 0.36);
}

.remember-row {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 clamp(26px, 4vh, 42px);
  color: rgba(32, 31, 48, 0.68);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.remember-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}

.login-form button {
  width: 150px;
  height: 46px;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 13px 24px rgba(244, 116, 88, 0.25);
}

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

.login-form button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notice {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.45;
}

.success {
  color: var(--success);
  background: var(--success-bg);
}

.error {
  color: var(--error);
  background: var(--error-bg);
}

.illustration-stage {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--page-bg);
}

.illustration-stage img {
  position: absolute;
  z-index: 1;
  right: clamp(-70px, -4.5vw, -20px);
  bottom: 0;
  width: auto;
  height: min(96vh, 1080px);
  max-width: none;
  pointer-events: none;
  user-select: none;
}

@media (max-width: 1180px) {
  .login-page {
    grid-template-columns: minmax(520px, 58vw) minmax(360px, 1fr);
  }

  .login-stage {
    padding: 44px 36px;
  }

  .login-card {
    padding-left: 50px;
    padding-right: 50px;
  }

  .illustration-stage img {
    right: -170px;
  }
}

@media (min-width: 901px) and (max-height: 820px) {
  .login-stage {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .login-card {
    min-height: 0;
    padding-top: 54px;
    padding-bottom: 44px;
  }

  .card-logo {
    margin-bottom: 34px;
  }

  .login-card h1 {
    margin-bottom: 28px;
    font-size: 44px;
  }

  .login-form {
    gap: 12px;
  }

  .input-box {
    height: 50px;
  }

  .remember-row {
    margin-top: 2px;
    margin-bottom: 12px;
  }
}

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

  .login-stage {
    min-height: 100vh;
    padding: 34px 24px;
    background: linear-gradient(180deg, rgba(255, 237, 225, 0.58), rgba(255, 255, 255, 0.92) 34%), #ffffff;
  }

  .login-stage::after,
  .illustration-stage {
    display: none;
  }

  .login-card {
    min-height: 0;
    padding: 52px 38px 42px;
  }
}

@media (max-width: 540px) {
  .login-stage {
    place-items: start center;
    padding-left: 18px;
    padding-right: 18px;
  }

  .login-card {
    padding: 40px 24px 34px;
    border-radius: 16px;
  }

  .login-card h1 {
    margin-bottom: 28px;
    font-size: 44px;
  }

  .login-form button {
    width: 100%;
  }
}
