/* ==========================================================================
   Tiko Pay Auth — 로그인 / 회원가입
   tiko-base.css(토큰·리셋·버튼·앱 셸)를 먼저 로드한 뒤 이 파일이 얹힌다.
   모바일에서는 카드를 벗고 네이티브 앱의 인증 화면처럼 전체를 채운다.
   ========================================================================== */

.auth-shell {
  position: relative; overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid; place-items: center;
  padding: calc(var(--header-h) + 48px) 0 64px;
}
.auth-shell::before {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  top: -300px; left: 50%; transform: translateX(-50%);
  width: 860px; height: 860px;
  background: radial-gradient(circle, rgba(195, 255, 23, 0.13) 0%, rgba(195, 255, 23, 0) 62%);
}

.auth-card {
  position: relative; z-index: 1;
  width: min(452px, calc(100% - 40px));
  padding: 44px 44px 38px;
  background: linear-gradient(160deg, #1f1f1f 0%, #161616 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
}

.auth-card__brand {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 26px;
}
.auth-card h1 {
  font-size: 2rem; font-weight: 800; letter-spacing: -0.042em; line-height: 1.2;
  margin-bottom: 10px;
}
.auth-card__desc { font-size: 0.9375rem; color: var(--t-low); margin-bottom: 30px; }

/* ------------------------------------------------------------- messages -- */
.auth-messages { display: grid; gap: 8px; margin-bottom: 22px; }
.auth-message {
  padding: 12px 16px; border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  font-size: 0.875rem; color: var(--t-mid);
}
.auth-message--success { border-color: rgba(195, 255, 23, 0.4); color: var(--lime); }
.auth-message--error { border-color: rgba(255, 92, 92, 0.45); color: #ff8f8f; }

.form-errors {
  display: grid; gap: 4px; margin-bottom: 20px;
  padding: 13px 16px; border-radius: var(--r-xs);
  background: rgba(255, 92, 92, 0.08); border: 1px solid rgba(255, 92, 92, 0.4);
  font-size: 0.875rem; color: #ff9d9d;
}

/* ----------------------------------------------------------------- form -- */
.auth-form { display: grid; gap: 20px; }
.form-group { display: grid; gap: 9px; }
.form-group label {
  font-size: 0.8125rem; font-weight: 600; color: var(--t-low); letter-spacing: -0.01em;
}

.input-field {
  width: 100%; height: 54px; padding: 0 17px;
  font-family: inherit; font-size: 1rem; color: var(--t-hi);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  appearance: none;
}
.input-field::placeholder { color: var(--t-dim); }
.input-field:hover { border-color: var(--line-2); }
.input-field:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(195, 255, 23, 0.16);
}
/* 크롬 자동완성이 흰 배경을 덮어쓰지 않도록 */
.input-field:-webkit-autofill,
.input-field:-webkit-autofill:hover,
.input-field:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--t-hi);
  -webkit-box-shadow: 0 0 0 1000px #1e1e1e inset;
  caret-color: var(--t-hi);
  transition: background-color 9999s ease-out;
}

.field-error { font-size: 0.8125rem; color: #ff8f8f; }

.auth-form .btn { margin-top: 6px; }

.auth-card__footer {
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 0.875rem; color: var(--t-dim); text-align: center;
}
.auth-card__footer a { color: var(--lime); font-weight: 600; }
.auth-card__footer a:hover { text-decoration: underline; }

.auth-legal {
  position: relative; z-index: 1;
  margin-top: 22px; text-align: center;
  font-size: 0.75rem; line-height: 1.7; color: var(--t-dim);
}

/* ------------------------------------------------------------ auth 헤더 -- */
.auth-header {
  position: fixed; inset: 0 0 auto 0; z-index: 90; height: var(--header-h);
}
.auth-header__inner {
  display: flex; align-items: center; justify-content: space-between; height: 100%;
}
.auth-header__links { display: flex; align-items: center; gap: 20px; }
.auth-header__links a { font-size: 0.875rem; font-weight: 500; color: var(--t-low); transition: color 0.2s; }
.auth-header__links a:hover { color: var(--lime); }

/* ==========================================================================
   Mobile — 네이티브 인증 화면
   ========================================================================== */
@media (max-width: 900px) {
  body {
    /* 인증 화면에는 탭바를 띄우지 않는다 (네이티브 앱도 인증 중엔 탭을 감춘다) */
    padding-bottom: 0;
  }

  .auth-header { display: none; }

  .auth-shell {
    display: block;
    min-height: 100dvh;
    padding: calc(var(--appbar-h) + var(--safe-t) + 20px) 0 calc(32px + var(--safe-b));
  }
  .auth-shell::before { top: -360px; width: 620px; height: 620px; }

  /* 카드 크롬을 벗고 화면 자체가 폼이 된다 */
  .auth-card {
    width: 100%;
    padding: 12px 18px 0;
    background: none; border: 0; box-shadow: none; border-radius: 0;
  }
  .auth-card__brand { display: none; }
  .auth-card h1 { font-size: 1.875rem; margin-bottom: 8px; }
  .auth-card__desc { font-size: 0.9375rem; margin-bottom: 28px; }

  .auth-form { gap: 18px; }
  .input-field { height: 56px; font-size: 1rem; border-radius: var(--r-sm); }
  .auth-form .btn { margin-top: 12px; height: 58px; font-size: 1.0625rem; }

  .auth-card__footer { margin-top: 22px; padding-top: 20px; }
  .auth-legal { padding-inline: 18px; }
}
