/* =========================
   Auth UI (withcafe / cardvalue style)
   ========================= */

/* ===== Base layout ===== */
.auth-page {
  max-width: 480px;
  margin: 48px auto;
  padding: 0 16px;
}

.auth-card {
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .08);
}

.auth-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 16px;
}

/* cardvalue 由来の input */
.cv-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.form-row {
  margin-bottom: 14px;
}

.btn-primary {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  background: #111827;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary:hover {
  opacity: .9;
}

.errorlist,
.nonfield {
  color: #b91c1c;
  font-size: .9rem;
  margin-bottom: 8px;
}

.form-help {
  font-size: .85rem;
  color: #6b7280;
  margin-top: 4px;
}

.g-recaptcha { transform-origin: left top; } /* モバイルでの崩れ軽減 */


/* =========================
   Fancy / modern enhancements
   （auth-page--fancy / auth-card--fancy を付けた時に有効）
   ========================= */

/* ===== Fancy layout ===== */
.auth-page--fancy {
  max-width: 520px;     /* 少し広くして余白が映える */
  margin: 56px auto;
}

.auth-card--fancy {
  position: relative;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .10);
  padding: 28px;
}

/* うっすらハイライトの縁取り */
.auth-card--fancy::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, .25),
    rgba(16, 185, 129, .18),
    rgba(244, 114, 182, .18)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* header block */
.auth-header { margin-bottom: 18px; }

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.04);
  border: 1px solid rgba(17, 24, 39, 0.06);
  font-size: .85rem;
  color: #111827;
  margin-bottom: 10px;
}

.auth-title {
  font-size: 1.35rem;
  letter-spacing: .01em;
  margin-bottom: 6px;
}

.auth-subtitle {
  margin: 0;
  color: #6b7280;
  font-size: .92rem;
  line-height: 1.5;
}

/* label tuning */
.form-row label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: .92rem;
  color: #111827;
  font-weight: 600;
}

/* ===== Inputs ===== */
/* withcafe は form-control を付けてるので cv-input と同等に扱う */
.cv-input,
.form-control {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease, transform .05s ease;
}

/* フォーカスを気持ちよく */
.cv-input:focus,
.form-control:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
  background: #fff;
}

/* ===== Password toggle wrapper ===== */
.input-wrap {
  position: relative;
}

.input-wrap .form-control {
  padding-right: 64px; /* ボタン分の余白 */
}

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(17, 24, 39, 0.03);
  color: #111827;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: .85rem;
  cursor: pointer;
}

.pw-toggle:hover {
  background: rgba(17, 24, 39, 0.06);
}

/* ===== Buttons ===== */
.btn-primary--fancy {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #111827 0%, #1f2937 50%, #111827 100%);
  box-shadow: 0 10px 18px rgba(17, 24, 39, .16);
  transition: transform .08s ease, box-shadow .15s ease, opacity .15s ease;
}

.btn-primary--fancy:hover {
  opacity: 1;
  box-shadow: 0 14px 22px rgba(17, 24, 39, .20);
}

.btn-primary--fancy:active {
  transform: translateY(1px);
}

/* ===== Links ===== */
.auth-links {
  margin-top: 14px;
  text-align: center;
  font-size: .92rem;
  color: #6b7280;
}

.auth-link {
  color: #111827;
  text-decoration: none;
  border-bottom: 1px dashed rgba(17,24,39,.25);
}

.auth-link:hover {
  border-bottom-style: solid;
}

.auth-dot {
  margin: 0 8px;
  color: #9ca3af;
}

/* ===== Error tuning ===== */
.errorlist,
.nonfield {
  color: #b91c1c;
  font-size: .9rem;
  margin-bottom: 10px;
}

.nonfield {
  border-left: 3px solid #b91c1c;
  padding-left: 10px;
}

/* recaptcha: keep */
.g-recaptcha { transform-origin: left top; }

/* signup notes */
.auth-note {
  margin-top: 12px;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(17,24,39,.08);
  background: rgba(17,24,39,.03);
}

.auth-note__line {
  font-size: .9rem;
  color: #111827;
  font-weight: 600;
  margin-bottom: 8px;
}

.auth-note__warn {
  font-size: .8rem;
  color: #6b7280;
  line-height: 1.55;
}

.auth-note__warn a {
  color: #111827;
}

/* =========================
   Email validation sent page
   ========================= */

/* success hero */
.auth-card--success .success-hero{
  display:flex;
  gap:14px;
  align-items:center;
  padding:16px 0 14px;
  border-bottom:1px solid rgba(17,24,39,.08);
  margin-bottom:14px;
}

.auth-card--success .success-icon{
  width:46px;
  height:46px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:rgba(16,185,129,.12);
  flex:0 0 auto;
}

.auth-card--success .success-icon i{
  font-size:24px;
  line-height:1;
  color:#10b981;
}

.auth-card--success .success-title{
  margin:0;
  font-size:1.15rem;
  font-weight:800;
  letter-spacing:.01em;
}

.auth-card--success .success-lead{
  margin:6px 0 0;
  color:#6b7280;
  font-size:.92rem;
  line-height:1.55;
}

/* steps */
.auth-card--success .success-steps{
  display:grid;
  gap:10px;
  margin:0 0 12px;
}

.auth-card--success .step{
  display:flex;
  gap:10px;
  padding:12px;
  border:1px solid rgba(17,24,39,.08);
  border-radius:12px;
  background:rgba(17,24,39,.02);
}

.auth-card--success .step-num{
  width:26px;
  height:26px;
  border-radius:999px;
  display:grid;
  place-items:center;
  font-weight:800;
  font-size:.85rem;
  background:rgba(17,24,39,.06);
  color:#111827;
  flex:0 0 auto;
}

.auth-card--success .step-title{
  font-weight:800;
  color:#111827;
  font-size:.95rem;
}

.auth-card--success .step-desc{
  margin-top:4px;
  color:#6b7280;
  font-size:.88rem;
  line-height:1.55;
}

.auth-card--success .mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:.95em;
}

/* hint accordion */
.auth-card--success .hint{
  margin-top:10px;
  border:1px dashed rgba(17,24,39,.18);
  border-radius:12px;
  padding:10px 12px;
  background:rgba(17,24,39,.01);
}

.auth-card--success .hint-title{
  cursor:pointer;
  font-weight:800;
  color:#111827;
  font-size:.92rem;
}

.auth-card--success .hint-list{
  margin:10px 0 0;
  padding-left:18px;
  color:#6b7280;
  font-size:.88rem;
  line-height:1.65;
}

/* actions */
.auth-card--success .success-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}

.auth-card--success .btn-ghost{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  border-radius:12px;
  padding:12px 14px;
  font-weight:800;
  text-decoration:none;
  border:1px solid rgba(17,24,39,.14);
  background:#fff;
  color:#111827;
}

.auth-card--success .btn-ghost:hover{
  background:rgba(17,24,39,.03);
}

/* 上の btn-primary（既存）と並べた時の見た目調整 */
.auth-card--success .success-actions .btn-primary{
  text-decoration:none;
}

/* footnote */
.auth-card--success .success-footnote{
  margin-top:12px;
  font-size:.8rem;
  color:#6b7280;
  line-height:1.6;
}

/* responsive */
@media (max-width:480px){
  .auth-card--success .success-hero{ align-items:flex-start; }
}

/* 2カラム（姓名横並び） */
.form-row--grid2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px; /* 既存 .form-row と揃える */
}

.form-row--grid2 .form-col{
  min-width: 0;
}

/* スマホは縦積み */
@media (max-width: 520px){
  .form-row--grid2{
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
