:root {
  --page: #f4f8fd;
  --brand-orange: #ea582b;
  --brand-green: #209546;
  --brand-orange-muted: #dc653f;
  --brand-green-muted: #2d8d4d;
  --brand-orange-soft: rgba(234, 88, 43, 0.14);
  --brand-green-soft: rgba(32, 149, 70, 0.14);
  --dark: #0f172a;
  --dark-2: #111827;
  --ink: #2d3033;
  --muted: #62738c;
  --blue: #3a8dde;
  --blue-dark: #236fb8;
  --line: #d5dde8;
  --error: #c33d3d;
  --shadow: 0 30px 70px rgba(15, 23, 42, 0.15);
}

* {
  box-sizing: border-box;
}

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

body.eaiforge-login-page {
  margin: 0;
  min-height: 100vh;
  padding: 40px 24px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 16% 14%, rgba(234, 88, 43, 0.15), transparent 22rem),
    radial-gradient(circle at 84% 17%, rgba(32, 149, 70, 0.14), transparent 24rem),
    radial-gradient(circle at 50% 92%, rgba(32, 149, 70, 0.06), transparent 28rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), transparent 42%),
    var(--page);
  color: var(--ink);
  font-family: Poppins, Inter, "Noto Sans KR", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

.eaiforge-shell {
  width: min(92vw, 1480px);
  height: clamp(558px, 70vh, 738px);
  display: grid;
  grid-template-columns: minmax(300px, 0.45fr) minmax(420px, 0.55fr);
  align-items: stretch;
  justify-content: center;
  isolation: isolate;
  animation: eaiforge-shell-in 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.eaiforge-brand-panel,
.eaiforge-form-panel {
  min-height: 0;
  box-shadow: var(--shadow);
}

.eaiforge-brand-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 76px 0 0 76px;
  background:
    radial-gradient(circle at 42% 36%, rgba(255, 255, 255, 0.18), transparent 16rem),
    linear-gradient(135deg, var(--brand-orange), var(--brand-green));
  background-size: 100% 100%, 150% 150%;
  animation: eaiforge-brand-shift 7s ease-in-out infinite alternate;
}

.eaiforge-brand-panel::before,
.eaiforge-brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.eaiforge-brand-panel::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(300deg, rgba(15, 23, 42, 0.18), transparent 42%);
  mix-blend-mode: soft-light;
}

.eaiforge-brand-panel::after {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.10) 0 1px, transparent 1px 100%) 0 0 / 42px 42px;
  opacity: 0.16;
}

.eaiforge-company-logo {
  width: min(250px, 48%);
  max-height: 82px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 16px 24px rgba(0, 0, 0, 0.20));
  position: relative;
  z-index: 3;
  animation: eaiforge-logo-in 760ms 160ms cubic-bezier(0.16, 1, 0.3, 1) both, eaiforge-logo-breathe 5.5s 1.2s ease-in-out infinite;
}

.eaiforge-brand-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0.95;
  z-index: 1;
}

.eaiforge-brand-mark span {
  position: absolute;
  border-radius: 999px;
}

.eaiforge-brand-mark span:nth-child(1) {
  width: 136px;
  height: 136px;
  margin: 70px 0 0 70px;
  background: rgba(234, 88, 43, 0.58);
  filter: blur(0.2px);
  animation: eaiforge-float-a 5.2s ease-in-out infinite;
}

.eaiforge-brand-mark span:nth-child(2) {
  width: 116px;
  height: 116px;
  margin: -30px 0 0 -50px;
  background: rgba(32, 149, 70, 0.74);
  filter: blur(0.2px);
  animation: eaiforge-float-b 6s ease-in-out infinite;
}

.eaiforge-brand-mark span:nth-child(3) {
  width: 104px;
  height: 104px;
  margin: -64px 0 0 58px;
  background: rgba(255, 255, 255, 0.24);
  filter: blur(0.2px);
  animation: eaiforge-float-c 6.8s ease-in-out infinite;
}

.eaiforge-form-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 0 76px 76px 0;
  background: #fff;
  overflow: hidden;
  animation: eaiforge-panel-in 760ms 100ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.eaiforge-form-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.12), transparent);
}

.eaiforge-form-panel::after {
  content: "";
  position: absolute;
  top: 42px;
  right: 52px;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--brand-green-soft), transparent 70%);
  pointer-events: none;
}

.eaiforge-catchphrase {
  position: absolute;
  top: 28px;
  right: 44px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(520px, calc(100% - 88px));
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0.86;
  animation: eaiforge-content-in 720ms 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.eaiforge-catchphrase span {
  display: inline-flex;
  align-items: center;
}

.eaiforge-catchphrase span + span::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-right: 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-green));
  box-shadow: 0 0 0 4px rgba(32, 149, 70, 0.08);
}

.eaiforge-product {
  position: relative;
  z-index: 1;
  padding: clamp(44px, 6.8vh, 68px) clamp(48px, 5vw, 72px) 0;
  animation: eaiforge-content-in 720ms 190ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.eaiforge-product-logo {
  width: 210px;
  height: 58px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.eaiforge-product p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.eaiforge-form-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 28px clamp(48px, 5vw, 72px) 46px;
  animation: eaiforge-content-in 760ms 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.eaiforge-form-wrap h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 2.25vw, 38px);
  font-weight: 800;
  line-height: 1.08;
}

.eaiforge-subtitle {
  margin: 16px 0 26px;
  color: var(--brand-orange);
  font-size: clamp(17px, 1.35vw, 21px);
  font-weight: 500;
  line-height: 1.25;
}

.eaiforge-alert,
.eaiforge-field-error {
  margin: 0 0 24px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(195, 61, 61, 0.10);
  color: var(--error);
  font-size: 16px;
  font-weight: 700;
}

.eaiforge-field {
  margin-bottom: 18px;
}

.eaiforge-field label {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.eaiforge-field input[type="text"],
.eaiforge-field input[type="password"] {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  color: var(--ink);
  font-size: 17px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  appearance: none;
}

.eaiforge-field input:focus {
  border-color: var(--brand-green);
  background: #fff;
  box-shadow: 0 0 0 4px var(--brand-green-soft), 0 8px 18px rgba(15, 23, 42, 0.06);
}

.eaiforge-password-row {
  display: grid;
  grid-template-columns: 1fr 68px;
}

.eaiforge-password-row input {
  border-radius: 10px 0 0 10px !important;
}

.eaiforge-reveal {
  min-height: 54px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  background: #f8fafc;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  transition: background 0.16s ease, color 0.16s ease;
}

.eaiforge-reveal:hover,
.eaiforge-reveal:focus {
  background: rgba(32, 149, 70, 0.08);
  color: var(--brand-green);
}

.eaiforge-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 20px;
  color: var(--ink);
  font-size: 15px;
}

.eaiforge-remember {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.eaiforge-remember input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand-green);
}

.eaiforge-options a {
  color: var(--brand-green);
  font-weight: 700;
  text-decoration: none;
}

.eaiforge-options a:hover {
  color: var(--brand-orange);
  text-decoration: underline;
}

.eaiforge-submit {
  width: 100%;
  min-height: 60px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-orange-muted), var(--brand-green-muted));
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 16px 28px rgba(32, 149, 70, 0.18);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.eaiforge-submit:hover,
.eaiforge-submit:focus {
  background: linear-gradient(135deg, #cf5632, #24783f);
  box-shadow: 0 20px 34px rgba(32, 149, 70, 0.23);
  transform: translateY(-1px);
}

.eaiforge-submit:active {
  transform: translateY(0);
  filter: saturate(0.96);
}

.eaiforge-submit--busy {
  cursor: progress;
  filter: saturate(0.86);
  opacity: 0.88;
  pointer-events: none;
}

.eaiforge-form-wrap--compact {
  padding-top: 42px;
}

.eaiforge-form-wrap--compact .eaiforge-subtitle {
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.45;
}

.eaiforge-secondary {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  border: 2px solid rgba(35, 164, 85, 0.38);
  border-radius: 8px;
  color: var(--brand-green);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
}

.eaiforge-secondary:hover,
.eaiforge-secondary:focus {
  border-color: var(--brand-green);
  background: rgba(35, 164, 85, 0.08);
  color: var(--brand-orange);
}

.eaiforge-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(98, 115, 140, 0.18);
  color: var(--muted);
  font-size: 13px;
}

.eaiforge-link-row a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.16s ease, transform 0.16s ease;
}

.eaiforge-link-row a:hover,
.eaiforge-link-row a:focus {
  color: var(--brand-green);
  transform: translateY(-1px);
}

.eaiforge-actions {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.eaiforge-action-link {
  display: grid;
  place-items: center;
  text-decoration: none;
}

@keyframes eaiforge-shell-in {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.972);
  }
  64% {
    opacity: 1;
    transform: translateY(-4px) scale(1.004);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes eaiforge-panel-in {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  68% {
    opacity: 1;
    transform: translateX(-3px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes eaiforge-content-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes eaiforge-logo-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes eaiforge-logo-breathe {
  0%, 100% {
    filter: brightness(0) invert(1) drop-shadow(0 16px 24px rgba(0, 0, 0, 0.20));
    transform: translateY(0) scale(1);
  }
  50% {
    filter: brightness(0) invert(1) drop-shadow(0 22px 30px rgba(0, 0, 0, 0.24));
    transform: translateY(-3px) scale(1.015);
  }
}

@keyframes eaiforge-brand-shift {
  from {
    background-position: 0 0, 0% 50%;
  }
  to {
    background-position: 8% 0, 100% 50%;
  }
}

@keyframes eaiforge-float-a {
  0%, 100% { transform: translate3d(0, 0, 0); }
  35% { transform: translate3d(16px, -18px, 0) scale(1.05); }
  70% { transform: translate3d(-7px, 10px, 0) scale(0.98); }
}

@keyframes eaiforge-float-b {
  0%, 100% { transform: translate3d(0, 0, 0); }
  42% { transform: translate3d(-18px, 13px, 0) scale(1.04); }
  76% { transform: translate3d(8px, -8px, 0) scale(0.98); }
}

@keyframes eaiforge-float-c {
  0%, 100% { transform: translate3d(0, 0, 0); }
  48% { transform: translate3d(12px, 16px, 0) scale(1.06); }
  78% { transform: translate3d(-9px, -7px, 0) scale(0.98); }
}

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

@media (max-width: 1080px) {
  body.eaiforge-login-page {
    padding: 32px 22px;
  }

  .eaiforge-shell {
    grid-template-columns: minmax(300px, 760px);
    grid-template-rows: 260px auto;
    width: min(100%, 760px);
    height: auto;
  }

  .eaiforge-brand-panel,
  .eaiforge-form-panel {
    min-height: auto;
  }

  .eaiforge-brand-panel {
    min-height: 260px;
    border-radius: 48px 48px 0 0;
  }

  .eaiforge-form-panel {
    border-radius: 0 0 48px 48px;
  }

  .eaiforge-catchphrase {
    position: static;
    justify-content: center;
    flex-wrap: wrap;
    max-width: none;
    padding: 26px 42px 0;
    white-space: normal;
    text-align: center;
  }

  .eaiforge-company-logo {
    width: 250px;
  }

  .eaiforge-product {
    padding: 44px 42px 0;
  }

  .eaiforge-form-wrap {
    padding: 34px 42px 56px;
  }
}

@media (max-width: 560px) {
  body.eaiforge-login-page {
    padding: 18px 12px;
  }

  .eaiforge-shell {
    grid-template-rows: 190px auto;
    width: 100%;
  }

  .eaiforge-brand-panel {
    min-height: 190px;
    border-radius: 34px 34px 0 0;
  }

  .eaiforge-company-logo {
    width: 190px;
  }

  .eaiforge-form-panel {
    border-radius: 0 0 34px 34px;
  }

  .eaiforge-catchphrase {
    padding: 22px 24px 0;
    gap: 7px;
    font-size: 11px;
  }

  .eaiforge-catchphrase span + span::before {
    width: 4px;
    height: 4px;
    margin-right: 7px;
  }

  .eaiforge-product {
    padding: 30px 24px 0;
  }

  .eaiforge-product-logo {
    width: 190px;
    height: 54px;
  }

  .eaiforge-product p {
    font-size: 15px;
  }

  .eaiforge-form-wrap {
    padding: 28px 24px 36px;
  }

  .eaiforge-field label,
  .eaiforge-options,
  .eaiforge-options a {
    font-size: 15px;
  }

  .eaiforge-field input[type="text"],
  .eaiforge-field input[type="password"],
  .eaiforge-reveal {
    min-height: 54px;
    font-size: 16px;
  }

  .eaiforge-password-row {
    grid-template-columns: 1fr 64px;
  }

  .eaiforge-submit {
    min-height: 58px;
    font-size: 18px;
  }
}
