/* PR-2b: signup / verify standalone page styling.
 * SPA `static/index.html:11-23` の :root と同期。色変更時は両方触ること。
 * LP ではなく機能 page、シンプルな visual を意図。
 */
:root {
  --blue-dark: #1a3a6c;
  --blue-mid: #2e6db4;
  --blue-light: #4a9fd4;
  --blue-pale: #d6e4f7;
  --blue-bg: #f0f5fc;
  --gray-dark: #1a1a2e;
  --gray: #4a4a6a;
  --gray-light: #8899aa;
  --success: #27ae60;
  --danger: #e74c3c;
  --white: #ffffff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', sans-serif;
  background: var(--blue-bg);
  color: var(--gray-dark);
  line-height: 1.5;
}

.auth-container {
  max-width: 480px;
  margin: 60px auto;
  padding: 24px;
}
.auth-box {
  background: var(--white);
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
h1 {
  margin: 0 0 4px;
  color: var(--blue-dark);
  font-size: 28px;
  letter-spacing: 0.02em;
}
.subtitle {
  margin: 0 0 16px;
  color: var(--gray);
  font-weight: 500;
}
.info {
  margin: 0 0 20px;
  color: var(--gray);
  font-size: 14px;
}

/* form fields */
.field-label {
  display: block;
  margin: 12px 0 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-dark);
}
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: var(--white);
  color: var(--gray-dark);
}
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: var(--blue-mid);
  outline: none;
  box-shadow: 0 0 0 2px rgba(46, 109, 180, 0.15);
}
.hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--gray-light);
}

/* password strength checklist */
.pw-rules {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}
.pw-rules li {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0;
  color: var(--gray-light);
  transition: color 0.15s;
}
.pw-rules li::before {
  content: '○';
  font-size: 11px;
  flex-shrink: 0;
}
.pw-rules li.ok {
  color: var(--success);
}
.pw-rules li.ok::before {
  content: '✓';
}
/* confirm password match indicator */
.pw-match-hint {
  margin: 4px 0 0;
  font-size: 12px;
  min-height: 16px;
}
.pw-match-hint.ok { color: var(--success); }
.pw-match-hint.ng { color: var(--danger); }

/* checkboxes */
.checkbox-group {
  margin: 18px 0 8px;
}
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0;
  font-size: 14px;
  color: var(--gray-dark);
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  margin-top: 3px;
}
.checkbox-row a {
  color: var(--blue-mid);
  text-decoration: underline;
}

/* primary button */
.primary-btn {
  width: 100%;
  padding: 12px;
  margin: 18px 0 0;
  background: var(--blue-mid);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.primary-btn:hover:not(:disabled) {
  background: var(--blue-dark);
}
.primary-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* link button */
.link-btn {
  background: transparent;
  border: none;
  color: var(--blue-mid);
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
  padding: 4px 0;
}
.link-btn:disabled {
  color: var(--gray-light);
  cursor: not-allowed;
  text-decoration: none;
}

/* banner (error / warning) */
.auth-banner {
  padding: 10px 12px;
  border-radius: 6px;
  margin: 12px 0;
  font-size: 14px;
}
.auth-banner.error {
  background: #fde4e1;
  color: var(--danger);
  border: 1px solid var(--danger);
}
.auth-banner.warning {
  background: #fff7e6;
  color: #c97a00;
  border: 1px solid #e8b067;
}
.hidden {
  display: none !important;
}

/* code grid (verify 6 input) */
.code-grid {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 18px 0;
}
.code-input {
  width: 36px;
  height: 48px;
  font-size: 18px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: var(--white);
}
.code-input:focus {
  border-color: var(--blue-mid);
  outline: none;
  box-shadow: 0 0 0 2px rgba(46, 109, 180, 0.15);
}
.code-input:disabled {
  background: #f0f0f0;
  color: #aaa;
}

/* resend area */
.resend-area {
  margin: 18px 0 0;
  text-align: center;
}
.resend-hint {
  font-size: 12px;
  color: var(--gray-light);
  margin-left: 8px;
}

/* footer */
.auth-footer {
  margin: 24px 0 0;
  text-align: center;
  font-size: 13px;
}
.auth-footer a {
  color: var(--gray);
  text-decoration: none;
}
.auth-footer a:hover {
  text-decoration: underline;
}

/* mobile (375x812) */
@media (max-width: 480px) {
  .auth-container { margin: 16px; padding: 0; }
  .auth-box { padding: 20px 16px; }
  h1 { font-size: 24px; }
  .code-input { width: 14vw; max-width: 36px; }
}

/* ===== Step indicator sticky header (signup / verify) ===== */
.step-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--blue-dark);
  padding: 12px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.step-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.step-label {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s;
}
.step-item.active .step-num {
  background: var(--blue-light);
  color: var(--white);
}
.step-item.active .step-label {
  color: var(--white);
}
.step-item.done .step-num {
  background: var(--success);
  color: var(--white);
}
.step-item.done .step-label {
  color: rgba(255,255,255,0.8);
}
.step-connector {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.15);
  margin: 0 8px;
  margin-bottom: 14px;
  min-width: 32px;
  max-width: 80px;
  transition: background 0.2s;
}
.step-connector.active {
  background: var(--blue-light);
}

/* ===== Hero section (signup page) ===== */
.auth-hero {
  text-align: center;
  padding: 28px 24px 0;
}
.hero-title {
  margin: 0 0 4px;
  color: var(--blue-dark);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.hero-subtitle {
  margin: 0 0 14px;
  color: var(--gray);
  font-size: 15px;
  font-weight: 500;
}
.hero-features {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.hero-feat {
  display: inline-block;
  padding: 4px 12px;
  background: var(--blue-pale);
  color: var(--blue-dark);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* ===== Step progress label inside auth-box ===== */
.step-progress {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--blue-mid);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-left: 3px solid var(--blue-mid);
  padding-left: 8px;
}

/* ===== PW strength visual bar ===== */
.pw-strength-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 4px;
}
.pw-strength-bar {
  flex: 1;
  height: 5px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  transition: width 0.25s ease, background 0.25s ease;
  background: #ccc;
}
.pw-strength-fill.strength-0 { width: 0%; background: #ccc; }
.pw-strength-fill.strength-1 { width: 25%; background: var(--danger); }
.pw-strength-fill.strength-2 { width: 50%; background: var(--warning); }
.pw-strength-fill.strength-3 { width: 75%; background: #2ecc71; }
.pw-strength-fill.strength-4 { width: 100%; background: var(--success); }
.pw-strength-label {
  font-size: 11px;
  color: var(--gray-light);
  white-space: nowrap;
  min-width: 40px;
}

/* ===== Collapsible help section (verify page) ===== */
.help-collapsible {
  margin: 20px 0 0;
  border: 1px solid #dde8f5;
  border-radius: 6px;
  overflow: hidden;
}
.help-toggle {
  width: 100%;
  padding: 10px 14px;
  background: var(--blue-pale);
  border: none;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.help-toggle::after {
  content: '+';
  font-size: 16px;
  font-weight: 400;
  color: var(--gray-light);
  transition: transform 0.2s;
}
.help-toggle[aria-expanded="true"]::after {
  content: '-';
}
.help-content {
  display: none;
  padding: 12px 16px;
  background: var(--white);
  font-size: 13px;
  color: var(--gray);
  line-height: 1.8;
}
.help-content.open {
  display: block;
}
.help-content ul {
  margin: 0;
  padding-left: 18px;
}
.help-content a {
  color: var(--blue-mid);
}

@media (max-width: 480px) {
  .step-label { display: none; }
  .step-connector { min-width: 16px; }
  .hero-title { font-size: 28px; }
  .auth-hero { padding: 20px 16px 0; }
}
