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

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

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

header {
  text-align: center;
  padding: 20px 0 16px;
}

header h1 {
  font-size: 1.6rem;
  color: #c06090;
}

/* 検索・追加エリア */
.search-section {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-bar {
  flex: 1;
  min-width: 180px;
}

.search-bar input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e0b8d0;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  outline: none;
}

.search-bar input:focus {
  border-color: #c06090;
}

/* ボタン */
.btn-primary {
  background: #c06090;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary:hover {
  background: #a84f7c;
}

.btn-secondary {
  background: #f0f0f0;
  color: #555;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.btn-danger {
  background: #e05555;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-danger:hover {
  background: #c44040;
}

.btn-small {
  padding: 7px 12px;
  font-size: 0.82rem;
}

/* フォームカード */
.form-card {
  background: #fff;
  border: 1px solid #f0c8dc;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.form-card h2,
.form-card h3 {
  color: #c06090;
  margin-bottom: 14px;
  font-size: 1rem;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 4px;
}

.required {
  color: #e05555;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fafafa;
  outline: none;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #c06090;
  background: #fff;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.hidden {
  display: none;
}

/* 顧客一覧 */
.customer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.customer-card {
  background: #fff;
  border: 1px solid #f0c8dc;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.customer-card:hover {
  box-shadow: 0 2px 8px rgba(192, 96, 144, 0.15);
  border-color: #c06090;
}

.customer-card.active {
  border-color: #c06090;
  box-shadow: 0 2px 8px rgba(192, 96, 144, 0.2);
}

.customer-card-name {
  font-size: 1rem;
  font-weight: bold;
  color: #333;
}

.customer-card-meta {
  font-size: 0.8rem;
  color: #888;
  margin-top: 4px;
}

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

/* 詳細パネル */
.detail-panel {
  background: #fff;
  border: 1px solid #f0c8dc;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}

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

.detail-header h2 {
  font-size: 1.2rem;
  color: #c06090;
}

.detail-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.customer-memo {
  background: #fdf0f6;
  border-left: 3px solid #c06090;
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 14px;
}

.customer-memo:empty {
  display: none;
}

/* 施術履歴 */
.record-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.record-card {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 14px;
  position: relative;
}

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

.record-date {
  font-size: 0.85rem;
  font-weight: bold;
  color: #c06090;
}

.record-service {
  font-size: 0.95rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 6px;
}

.record-recipe {
  font-size: 0.83rem;
  color: #555;
  background: #fff3f9;
  border: 1px solid #f0c8dc;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 6px;
  white-space: pre-wrap;
  word-break: break-word;
}

.record-note {
  font-size: 0.82rem;
  color: #888;
  white-space: pre-wrap;
  word-break: break-word;
}

.btn-delete-record {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  line-height: 1;
}

.btn-delete-record:hover {
  color: #e05555;
}

.record-empty {
  text-align: center;
  color: #bbb;
  font-size: 0.88rem;
  padding: 20px 0;
}

/* レスポンシブ */
@media (max-width: 480px) {
  header h1 {
    font-size: 1.3rem;
  }

  .detail-header {
    flex-direction: column;
  }

  .detail-header-actions {
    width: 100%;
  }

  .detail-header-actions .btn-small {
    flex: 1;
    text-align: center;
  }
}
