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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #1f2937;
  min-height: 100vh;
}

header {
  background: #3b82f6;
  color: white;
  padding: 16px 20px;
  text-align: center;
}

header h1 {
  font-size: 1.3rem;
  font-weight: 700;
}

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: #374151;
  border-left: 4px solid #3b82f6;
  padding-left: 10px;
}

/* 部下登録 */
.input-row {
  display: flex;
  gap: 8px;
}

.input-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
}

.input-row input:focus {
  outline: none;
  border-color: #3b82f6;
}

.input-row button {
  padding: 10px 16px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.input-row button:hover {
  background: #2563eb;
}

#member-list {
  list-style: none;
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.9rem;
}

.member-tag .del-btn {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  line-height: 1;
}

.member-tag .del-btn:hover {
  color: #ef4444;
}

/* フォーム */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
}

.form-group select,
.form-group input[type="date"],
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
}

.form-group select:focus,
.form-group input[type="date"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
}

.form-group textarea {
  resize: vertical;
}

.btn-primary {
  width: 100%;
  padding: 12px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}

.btn-primary:hover {
  background: #2563eb;
}

/* 履歴絞り込み */
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.filter-row select {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* 面談記録カード */
.record-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
}

.record-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.record-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.record-member {
  font-weight: 700;
  color: #1d4ed8;
  font-size: 0.95rem;
}

.record-date {
  font-size: 0.8rem;
  color: #6b7280;
}

.del-record-btn {
  background: none;
  border: none;
  color: #d1d5db;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 2px 4px;
}

.del-record-btn:hover {
  color: #ef4444;
}

.record-section-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  margin-bottom: 3px;
  margin-top: 8px;
}

.record-text {
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: #374151;
}

.action-box {
  background: #fefce8;
  border-left: 3px solid #facc15;
  padding: 8px 10px;
  border-radius: 4px;
  margin-top: 4px;
}

.action-done {
  background: #f0fdf4;
  border-left-color: #4ade80;
}

.action-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.action-check {
  margin-top: 3px;
  accent-color: #3b82f6;
  cursor: pointer;
  flex-shrink: 0;
}

.action-text {
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: #374151;
  flex: 1;
}

.action-text.done-text {
  text-decoration: line-through;
  color: #9ca3af;
}

.empty-msg {
  color: #9ca3af;
  font-size: 0.9rem;
  text-align: center;
  padding: 20px 0;
}

@media (max-width: 480px) {
  main {
    padding: 12px;
  }
  .card {
    padding: 16px;
  }
}
