/* ===============================
   Auth (Login / Register) common
   =============================== */

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto,
               "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background: linear-gradient(180deg, #0b1220, #05080f);
  color: #e5e7eb;
}

/* ===== Layout ===== */

.auth-wrapper {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 16px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

/* ===== Brand ===== */

.brand {
  text-align: center;
  margin-bottom: 20px;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-desc {
  margin-top: 6px;
  font-size: 13px;
  color: #c7d2fe;
}

/* ===== Title ===== */

.auth-title {
  margin: 0 0 24px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
}

/* ===== Form ===== */

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #cbd5f5;
}

.form-group input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
}

/* ===== Button ===== */

.btn-primary {
  width: 100%;
  padding: 12px;
  margin-top: 4px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: #020617;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

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

/* ===== Error ===== */

.global-error {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.4);
  font-size: 14px;
}

.error-text {
  color: #f87171;
  font-size: 13px;
  margin-top: 6px;
}

/* ===== Footer ===== */

.auth-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
}

.auth-footer a {
  color: #93c5fd;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ===== Register Stepper ===== */
.stepper {
  display: flex;
  gap: 10px;
  margin: 18px 0 22px;
}

.step {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}

.step > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  transition: width 200ms ease;
}

.section-title{
  margin: 18px 0 10px;
  font-size: 16px;
  font-weight: 800;
}

.auth-note{
  margin: 10px 0 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  line-height: 1.6;
}

/* ===== Radio / Checkbox (clickable rows) ===== */
.choice-group{
  display: grid;
  gap: 10px;
}

.choice-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.18);
  cursor: pointer;
  user-select: none;
}

.choice-item:hover{
  border-color: rgba(96,165,250,0.55);
}

.choice-item input{
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.choice-item .choice-text{
  display: grid;
  gap: 2px;
}

.choice-item .choice-main{
  font-weight: 700;
}

.choice-item .choice-sub{
  font-size: 12px;
  color: rgba(255,255,255,0.65);
}

.choice-item.is-checked{
  border-color: rgba(96,165,250,0.80);
  box-shadow: 0 0 0 3px rgba(96,165,250,0.18);
}

/* select styling */
select{
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.25);
  color: #fff;
}

/* Step buttons */
.step-actions{
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.btn-secondary{
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  font-weight: 700;
  cursor: pointer;
}
.btn-secondary:hover{ filter: brightness(1.05); }

/* Hide steps */
.step-panel[hidden]{ display:none !important; }

/* ===== Step label ===== */
.step-label{
  text-align: center;
  margin: 8px 0 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.85);
}

/* =========================
   ★ ① 適格請求書ブロック強調
   ========================= */
.invoice-block.is-highlight{
  border: 1px solid rgba(96,165,250,0.80);
  border-radius: 12px;
  padding: 12px;
  background: rgba(0,0,0,0.12);
  box-shadow: 0 0 0 3px rgba(96,165,250,0.18);
}

/* =========================
   ★ ② 身分証プレビュー
   ========================= */
.id-preview{
  margin-top: 8px;
  max-width: 160px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.20);
}
