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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #333;
  font-size: 16px;
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px;
}

h1 {
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 16px;
  color: #2c7be5;
}

h2 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: #444;
  border-left: 4px solid #2c7be5;
  padding-left: 8px;
}

.card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

input[type="text"],
input[type="date"],
input[type="month"] {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
}

button {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: #2c7be5;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  background: #1a65cc;
}

.btn-primary {
  width: 100%;
  padding: 10px;
  font-size: 0.95rem;
  margin-top: 8px;
}

/* メンバーリスト */
.member-list {
  list-style: none;
}

.member-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.95rem;
}

.member-list li:last-child {
  border-bottom: none;
}

.delete-btn {
  background: #e53e3e;
  padding: 4px 10px;
  font-size: 0.8rem;
}

.delete-btn:hover {
  background: #c53030;
}

/* 出欠フォーム */
.attendance-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attendance-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
}

.attendance-row:last-child {
  border-bottom: none;
}

.member-label {
  flex: 1;
  font-size: 0.95rem;
}

.status-group {
  display: flex;
  gap: 4px;
}

.status-btn {
  padding: 4px 10px;
  font-size: 0.82rem;
  background: #e2e8f0;
  color: #555;
  border-radius: 4px;
}

.status-btn:hover {
  background: #cbd5e0;
}

.status-btn.active-present {
  background: #38a169;
  color: #fff;
}

.status-btn.active-absent {
  background: #e53e3e;
  color: #fff;
}

.status-btn.active-late {
  background: #dd6b20;
  color: #fff;
}

/* 統計テーブル */
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.stats-table th,
.stats-table td {
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.stats-table th {
  background: #f0f4ff;
  color: #444;
  font-weight: 600;
}

.stats-table td:first-child {
  text-align: left;
}

.rate-high { color: #38a169; font-weight: 600; }
.rate-mid  { color: #dd6b20; font-weight: 600; }
.rate-low  { color: #e53e3e; font-weight: 600; }

.no-data {
  color: #999;
  text-align: center;
  padding: 12px 0;
  font-size: 0.9rem;
}

@media (max-width: 400px) {
  .status-btn {
    padding: 4px 7px;
    font-size: 0.78rem;
  }
}
