/* 全体のリセットと基本設定 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  background-color: #f4f7f6;
  color: #333;
  line-height: 1.6;
}

/* アプリのコンテナ（スマホを意識した幅に） */
#app-container {
  max-width: 480px;
  margin: 0 auto;
  background-color: #ffffff;
  min-height: 100vh;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

header {
  background-color: #ff9800; /* したっけ？っぽく暖かみのあるオレンジ */
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.5rem;
}

main {
  padding: 20px;
  flex: 1;
}

/* ユーティリティクラス */
.hidden {
  display: none !important;
}

.message {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #d32f2f;
}

/* ボタンのスタイル */
button {
  cursor: pointer;
  border: none;
  border-radius: 5px;
  padding: 10px 15px;
  font-size: 1rem;
  font-weight: bold;
  transition: opacity 0.2s;
}

button:active {
  opacity: 0.8;
}

.primary-btn {
  background-color: #ff9800;
  color: white;
}

.secondary-btn {
  background-color: #e0e0e0;
  color: #333;
}

/* フォーム周り */
.input-group {
  margin-bottom: 15px;
}

.input-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

.role-selection {
  margin-bottom: 20px;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: 5px;
}

.role-selection p {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 5px;
}

.role-selection label {
  display: block;
  margin-bottom: 5px;
}

.auth-buttons {
  display: flex;
  gap: 10px;
}

.auth-buttons button {
  flex: 1;
}

#logout-btn {
  background-color: transparent;
  border: 1px solid white;
  color: white;
  padding: 5px 10px;
  font-size: 0.9rem;
}

/* ホーム画面のスタイル */
.user-info {
  margin-bottom: 15px;
  text-align: right;
}

#user-role-badge {
  background-color: #4caf50;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.add-house-box {
  background-color: #fff3e0;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 25px;
}

.add-house-box h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

#add-house-form {
  display: flex;
  gap: 10px;
}

#add-house-form input {
  flex: 1;
}

#house-list {
  list-style: none;
}

#house-list li {
  background-color: white;
  border: 1px solid #ddd;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.house-name {
  font-weight: bold;
  font-size: 1.1rem;
}

.check-status-preview {
  font-size: 0.8rem;
  color: #666;
  display: block;
  margin-top: 5px;
}

/* 家詳細画面のスタイル */
#back-btn {
  margin-bottom: 15px;
}

#detail-house-name {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ff9800;
}

.check-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.check-item {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.check-item .icon {
  font-size: 1.5rem;
  margin-right: 15px;
}

.check-item .label {
  flex: 1;
  font-weight: bold;
  font-size: 1.1rem;
}

.toggle-btn {
  padding: 15px 20px;
  border-radius: 30px;
  font-size: 1rem;
  width: 100px;
  text-align: center;
  background-color: #e0e0e0;
  color: #333;
}

/* 状態が「完了(true)」の時のスタイル */
.toggle-btn.checked {
  background-color: #4caf50;
  color: white;
}

.status-message {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #666;
  text-align: center;
}