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

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

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 20px;
  text-align: center;
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 12px;
}

/* フォーム */
.form-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 500px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

label {
  font-size: 0.8rem;
  color: #666;
  font-weight: 500;
}

input[type="text"],
input[type="date"],
input[type="time"] {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

input:focus {
  border-color: #2563eb;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #1d4ed8;
}

/* タブ */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-btn {
  flex: 1;
  background: #e5e7eb;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tab-btn.active {
  background: #2563eb;
  color: #fff;
}

/* タブコンテンツ */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* リストエリア */
.list-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 日別カード */
.day-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.day-card .day-header {
  font-size: 1rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 10px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 6px;
}

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

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

.shift-name {
  font-weight: 600;
  min-width: 80px;
}

.shift-time {
  color: #555;
  font-size: 0.9rem;
  flex: 1;
}

.shift-hours {
  color: #059669;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.btn-delete {
  background: none;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  color: #dc2626;
  font-size: 0.8rem;
  padding: 3px 8px;
  cursor: pointer;
  transition: background 0.2s;
}

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

/* 人別カード */
.person-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.person-name {
  font-weight: 700;
  font-size: 1rem;
}

.person-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2563eb;
}

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