@import url("./fonts.css");

/* 사용자 인증 화면의 반응형 레이아웃과 입력 상태를 표현한다. */
:root {
  color-scheme: light;
  --ink: #182844;
  --muted: #637087;
  --accent: #2563eb;
  --line: #dce3ee;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(480px, 1.05fr);
  background: #f8fafc;
  color: var(--ink);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
}
.auth-brand {
  background:
    radial-gradient(ellipse at 10% 70%, #224b7a 0, transparent 65%), #112a48;
  color: white;
  padding: 48px clamp(32px, 5vw, 88px);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  min-height: 660px;
}
.wordmark {
  display: flex;
  align-items: center;
}
.wordmark img {
  display: block;
  width: 245px;
  height: auto;
}
.brand-story {
  margin: auto 0;
  padding: 44px 0;
}
.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}
.brand-story .eyebrow {
  color: #9cc1ff;
  font-size: 11px;
  letter-spacing: 2px;
}
.auth-brand h2 {
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 1.3;
  letter-spacing: -1.8px;
  margin: 0 0 24px;
  font-weight: 650;
}
.auth-brand p {
  color: #bdcde2;
  font-size: 14px;
  line-height: 1.9;
  margin: 0;
}
.connection-map {
  margin-top: 48px;
  max-width: 360px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #527398;
  background: #ffffff0a;
  border-radius: 14px;
  padding: 18px;
}
.identity-icon {
  display: grid;
  place-items: center;
  background: #477ee2;
  border-radius: 10px;
  width: 38px;
  height: 38px;
  font-size: 20px;
}
.identity strong {
  font-size: 14px;
}
.identity small {
  display: block;
  color: #bdcde2;
  font-size: 11px;
  margin-top: 5px;
}
.connection-dot {
  width: 7px;
  height: 7px;
  background: #85dac6;
  border-radius: 50%;
  margin-left: auto;
}
.connection-line {
  height: 24px;
  width: 1px;
  background: #527398;
  margin: auto;
}
.connected-apps {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #527398;
  padding-top: 16px;
  color: #cbd8e9;
  font-size: 11px;
}
.connected-apps > div {
  flex: 1;
  text-align: center;
}
.connected-apps span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid #527398;
  background: #ffffff08;
  margin: 0 auto 9px;
  color: #dce9ff;
  font-weight: 700;
  font-size: 13px;
}
.brand-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #9fb5d0;
  font-size: 10px;
  letter-spacing: 1px;
}
.auth-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 48px 32px 24px;
}
.glass-panel {
  width: 100%;
  max-width: 448px;
  margin: auto;
  padding: 34px;
  border: 1px solid #e3e9f2;
  border-radius: 20px;
  background: white;
  box-shadow: 0 12px 40px #1d355008;
}
body > .glass-panel {
  align-self: center;
  margin: 40px auto;
}
.header {
  margin-bottom: 28px;
}
.title {
  font-size: 25px;
  line-height: 1.4;
  letter-spacing: -1px;
  margin: 0 0 10px;
  font-weight: 700;
  word-break: keep-all;
}
.subtitle {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
  word-break: keep-all;
}
.form-group {
  margin-bottom: 19px;
  min-width: 0;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 8px;
}
input:not([type="hidden"]),
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cdd7e4;
  border-radius: 9px;
  background: white;
  padding: 12px 13px;
  font-size: 14px;
  color: var(--ink);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
input::placeholder {
  color: #7a8799;
}
input[readonly],
select:disabled {
  background: #f1f5f9;
  color: var(--muted);
}
input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #2563eb18;
}
input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: #c43c44;
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 64px;
}
.password-toggle {
  position: absolute;
  right: 3px;
  top: 2px;
  min-width: 52px;
  min-height: 44px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #48607f;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
}
.password-toggle:hover {
  color: var(--accent);
  background: #eff5ff;
}
button[type="submit"],
.btn {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
button[type="submit"]:hover,
.btn:hover {
  background: #1d4ed8;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
form[aria-busy="true"] button[type="submit"] {
  cursor: wait;
}
.field-hint,
.field-error,
.password-check,
.caps-hint {
  display: block;
  font-size: 12px;
  line-height: 1.6;
  margin: 7px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.field-error {
  color: #b42332;
}
.field-error:empty,
[hidden] {
  display: none !important;
}
.password-check {
  margin: -10px 0 18px;
}
.password-check[data-valid="true"],
.field-hint[data-valid="true"] {
  color: #167355;
}
.caps-hint {
  color: #92580c;
}
.error-message {
  padding: 13px 14px;
  border: 1px solid #f4cdd0;
  border-radius: 9px;
  background: #fff4f4;
  color: #a82937;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 22px;
  overflow-wrap: anywhere;
}
.error-message:empty {
  display: none;
}
.success-message {
  border-color: #b9dfd0;
  background: #effaf4;
  color: #176248;
}
.signup-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin: 0 0 20px;
}
.auth-help {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
}
summary {
  cursor: pointer;
  line-height: 1.6;
  padding: 10px 0;
}
.auth-help p {
  margin: 4px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: #f5f8fc;
  line-height: 1.8;
}
.footer {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #e6ebf2;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
a {
  color: var(--accent);
  font-weight: 650;
  text-underline-offset: 4px;
}
.footer a {
  display: inline-block;
  padding: 8px 4px;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.page-footer {
  color: #718096;
  font-size: 11px;
  padding-top: 28px;
  text-align: center;
}
.client-info {
  padding: 16px;
  border: 1px solid var(--line);
  background: #f8faff;
  border-radius: 12px;
  margin-bottom: 24px;
  overflow-wrap: anywhere;
}
.client-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}
.client-heading > div {
  min-width: 0;
  flex: 1;
}
.app-symbol {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid #d6e3fa;
  border-radius: 9px;
  color: var(--accent);
  background: white;
  font-size: 20px;
}
.client-info .label {
  font-size: 10px;
  color: var(--muted);
}
.client-info .name {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
}
.protocol-badge {
  font-size: 9px;
  border-radius: 5px;
  padding: 5px;
  background: #e5eeff;
  color: #315ea6;
  white-space: nowrap;
}
.scope-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 16px;
  line-height: 1.6;
}
.scope-list {
  padding: 0;
  margin: 10px 0 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.9;
}
.scope-list li::before {
  content: "✓";
  color: #28745d;
  margin-right: 8px;
}
.redirect-details {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  border-top: 1px solid var(--line);
}
.redirect-details p {
  margin: 0 0 5px;
}
.icon-wrapper svg {
  width: 48px;
  height: 48px;
  color: #167355;
  margin-bottom: 20px;
}
:focus-visible {
  outline: 3px solid #6495f1;
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 10;
  padding: 12px;
  background: white;
}
.skip-link:focus {
  top: 12px;
}
@media (max-width: 850px) {
  body {
    display: block;
  }
  .auth-brand {
    position: static;
    height: auto;
    min-height: 0;
    padding: 22px 28px;
    background: #112a48;
  }
  .wordmark img {
    width: 211px;
  }
  .brand-story,
  .auth-brand > h2,
  .auth-brand > p,
  .brand-footer {
    display: none;
  }
  .auth-content {
    min-height: calc(100dvh - 74px);
    padding: 32px 20px 20px;
  }
  .glass-panel {
    padding: 28px;
  }
  .title {
    font-size: 24px;
  }
  input:not([type="hidden"]),
  select {
    font-size: 16px;
  }
  body > .glass-panel {
    max-width: calc(100% - 40px);
  }
}
@media (max-width: 380px) {
  .auth-content {
    padding: 24px 12px 20px;
  }
  .glass-panel {
    padding: 24px 20px;
  }
  .title {
    font-size: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
