@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable-dynamic-subset.css");

:root {
  --p-app-white: #fafafa;
  --p-app-light-white: #f4f4f5;
  --p-app-dark-white: #e4e4e7;
  --p-app-light-gray: #d4d4d8;
  --p-app-middle-gray: #71717a;
  --p-app-dark-gray: #52525b;
  --p-app-navy: #1e1b4b;
  --p-app-dark-navy: #020617;
  --p-app-deep-navy: #0f172a;
  --p-app-light-purple: #a78bfa;
  --p-app-middle-purple: #8b5cf6;
  --p-app-fixed-white: #fafafa;
  --p-app-fixed-light-purple: #a78bfa;
  --p-app-fixed-middle-purple: #8b5cf6;
  --p-app-fixed-yellow: #fbbf24;
  --p-app-deep-light-blue: #94a3b8;
  --p-app-black: #020617;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Pretendard Variable", "Pretendard", "Inter", "Noto Sans KR", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--p-app-white);
  background: var(--p-app-dark-navy);
}

html.app-light {
  --p-app-white: #18181b;
  --p-app-light-white: #27272a;
  --p-app-dark-white: #3f3f46;
  --p-app-light-gray: #52525b;
  --p-app-middle-gray: #71717a;
  --p-app-dark-gray: #d4d4d8;
  --p-app-navy: #e0e7ff;
  --p-app-dark-navy: #e2e8f0;
  --p-app-deep-navy: #f1f5f9;
  --p-app-black: #cbd5e1;
}

.d-full {
  height: 100dvh;
  width: 100dvw;
}

.full {
  height: 100%;
  width: 100%;
}

.flex-center {
  display: flex;
  align-items: center;
}

.flex-center-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-block {
  display: flex;
  flex-direction: column;
}

.flex-block-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flex-block-between {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.flex-stretch {
  display: flex;
  align-items: stretch;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
  top: 0;
  bottom: 0;
}

.left-0 {
  left: 0;
}

.z-50 {
  z-index: 50;
}

.min-h-0 {
  min-height: 0;
}

.absolute-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.login-wrap {
  height: 100%;
  width: 35%;
  max-width: 500px;
  min-width: 400px;
  display: flex;
  flex-direction: column;
  border-radius: 0 30px 30px 0;
  overflow: hidden;
}

.login-logo-bar {
  position: relative;
  height: 120px;
  flex-shrink: 0;
  background: var(--p-app-navy);
}

.login-logo-actions {
  position: absolute;
  right: 20px;
  top: 20px;
  z-index: 50;
}

.login-bg {
  flex: 1;
  min-height: 0;
  padding: 24px 32px 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--p-app-light-purple) 35%, transparent) 0%, transparent 35%),
    radial-gradient(circle at bottom left, color-mix(in srgb, #38bdf8 30%, transparent) 0%, transparent 30%),
    var(--p-app-dark-navy);
}

.login-head {
  padding: 16px 0 12px;
  gap: 8px;
  flex-shrink: 0;
}

.login-form-area {
  flex: 1 1 0;
  min-height: 0;
  max-height: calc(100dvh - 220px);
  overflow-y: auto;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

.login-form > .flex-block,
.login-form > .otp-setup,
.login-form > .login-error,
.login-form > .btn-large {
  flex-shrink: 0;
}

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

.login-foot {
  margin-top: 20px;
  text-align: center;
  color: var(--p-app-deep-light-blue);
  flex-shrink: 0;
}

.video-overlay-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.video-overlay-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 10;
  background: linear-gradient(to left, transparent, var(--p-app-black));
  opacity: 0.8;
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--p-app-dark-white);
}

.input-box {
  width: 100%;
  height: 50px;
  flex-shrink: 0;
  padding: 0 12px;
  border: 0.3px solid var(--p-app-dark-gray);
  border-radius: 12px;
  background: var(--p-app-deep-navy);
  color: var(--p-app-white);
  font: inherit;
  outline: none;
}

.input-box::placeholder {
  color: var(--p-app-light-gray);
}

.input-box:focus {
  outline: 1px solid var(--p-app-light-purple);
}

.password-wrap {
  position: relative;
}

.password-wrap .input-box {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--p-app-light-gray);
  cursor: pointer;
  padding: 0;
}

.btn-large {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 12px;
  background: var(--p-app-fixed-light-purple);
  color: var(--p-app-fixed-white);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-large:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--p-app-fixed-yellow);
  cursor: pointer;
}

.title-sm-semibold {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.body-lg-light {
  margin: 0;
  font-size: 16px;
  font-weight: 300;
}

.body-sm-semibold {
  font-size: 13px;
  font-weight: 600;
}

.body-sm-medium {
  font-size: 13px;
  font-weight: 500;
}

.caption-sm-medium {
  font-size: 11px;
  font-weight: 500;
}

.display-sm-semibold {
  margin: 0;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.15;
}

.display-md-semibold {
  margin: 0;
  font-size: 48px;
  font-weight: 600;
  line-height: 1.1;
}

.tooltip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--p-app-light-gray);
}

.login-wrap.otp-setup-visible .login-head {
  display: none;
}

.login-wrap.otp-setup-visible .login-foot {
  display: none;
}

.login-wrap.otp-setup-visible .login-form-area {
  padding-top: 4px;
}

.otp-setup {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: var(--p-app-deep-navy);
  border: 2px solid var(--p-app-middle-purple);
  border-radius: 16px;
  flex-shrink: 0;
}

.otp-qr-shell {
  display: none;
  align-items: center;
  justify-content: center;
  width: 160px;
  min-height: 160px;
  border: 1px dashed var(--p-app-white);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  padding: 8px;
  box-sizing: border-box;
}

.otp-qr-shell .otp-qr-img {
  display: none;
  width: 144px;
  height: 144px;
  object-fit: contain;
  background: #ffffff;
}

.otp-secret-inline {
  display: none;
  margin: 0;
  padding: 8px;
  word-break: break-all;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  color: #18181b;
}

.otp-secret-copy {
  margin: 0;
  padding: 10px 12px;
  width: 100%;
  word-break: break-all;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  color: #f4f4f5;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--p-app-middle-purple);
  border-radius: 8px;
}

.login-error {
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  font-size: 13px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.4);
}

.slogan {
  flex: 1;
  height: 100%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  color: var(--p-app-fixed-white);
}

@media (max-width: 900px) {
  .login-wrap {
    width: 100%;
    max-width: none;
    min-width: 0;
    border-radius: 0;
  }

  .slogan {
    display: none;
  }
}
