/* ============================================================
   Diagsolve — Auth Pages CSS
   v2: 視覚的区切り・可読性改善
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:     #080d1a;
  --bg2:    #0d1221;
  --bg3:    #111827;
  --border: rgba(255,255,255,0.10);
  --text:   #f1f5f9;
  --muted:  #94a3b8;
  --dim:    #64748b;
  --acc:    #3b82f6;
  --acc-h:  #60a5fa;
  --danger: #ef4444;
  --success:#22c55e;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}

/* ── Nav ── */
.nav {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  padding: 0 10%;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.0rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-logo svg { opacity: 0.7; }

/* ── Auth Wrapper ── */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

.auth-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 44px 40px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.auth-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acc);
  margin-bottom: 10px;
}

.auth-title {
  font-size: 2.0rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.auth-sub {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

/* ── Form ── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1.05rem;
  font-family: inherit;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.form-input::placeholder { color: var(--dim); }

.form-hint {
  font-size: 0.82rem;
  color: var(--dim);
  margin-top: 6px;
}

/* ── Password strength ── */
.pw-strength {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin-top: 8px;
  overflow: hidden;
}
.pw-strength-bar {
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s, background 0.3s;
}
.pw-strength-bar.weak   { background: var(--danger); }
.pw-strength-bar.fair   { background: #f97316; }
.pw-strength-bar.good   { background: #eab308; }
.pw-strength-bar.strong { background: var(--success); }

/* ── Alert ── */
.alert {
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.92rem;
  margin-bottom: 22px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.6;
}
.alert-error {
  background: rgba(239,68,68,0.10);
  border: 1px solid rgba(239,68,68,0.3);
  border-left: 4px solid var(--danger);
  color: #fca5a5;
}
.alert-success {
  background: rgba(34,197,94,0.10);
  border: 1px solid rgba(34,197,94,0.3);
  border-left: 4px solid var(--success);
  color: #86efac;
}
.alert svg { flex-shrink: 0; margin-top: 2px; }

/* ── Button ── */
.btn-primary {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--acc);
  color: #fff;
  font-size: 1.0rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s, opacity 0.15s;
  margin-top: 8px;
}
.btn-primary:hover { background: var(--acc-h); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Footer link ── */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.92rem;
  color: var(--muted);
}
.auth-footer a {
  color: var(--acc);
  text-decoration: none;
  font-weight: 600;
}
.auth-footer a:hover { text-decoration: underline; }

/* ── Divider ── */
.auth-divider {
  border: none;
  border-top: 2px solid var(--border);
  margin: 28px 0;
}

/* ── User info badge（ログイン済みページ用） ── */
.nav-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.nav-user-name strong { color: var(--text); }
.nav-logout {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dim);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: color 0.15s, border-color 0.15s;
}
.nav-logout:hover { color: var(--text); border-color: var(--muted); }

.form-inline {
  display: inline;
}

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .auth-title { font-size: 1.6rem; }
}
