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

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

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

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #4a6cf7;
}

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

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

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

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 4px;
}

.required {
  color: #e74c3c;
}

input[type="text"],
input[type="datetime-local"] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #333;
  background: #fafafa;
  transition: border-color 0.2s;
}

input:focus {
  outline: none;
  border-color: #4a6cf7;
  background: #fff;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.btn-primary {
  background: #4a6cf7;
  color: #fff;
  width: 100%;
  margin-top: 4px;
}

.btn-primary:hover {
  background: #3a5ce7;
}

/* フィルター */
.filter-section {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-btn {
  padding: 6px 16px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: #fff;
  font-size: 0.85rem;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn.active {
  background: #4a6cf7;
  color: #fff;
  border-color: #4a6cf7;
}

/* 一覧 */
.list-section {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.count-badge {
  display: inline-block;
  background: #4a6cf7;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 8px;
  vertical-align: middle;
  margin-left: 6px;
}

.visitor-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

/* 来訪者カード */
.visitor-card {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 12px;
  transition: box-shadow 0.2s;
}

.visitor-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.visitor-card.status-in {
  border-left: 4px solid #27ae60;
}

.visitor-card.status-out {
  border-left: 4px solid #95a5a6;
  opacity: 0.8;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
  gap: 8px;
}

.visitor-name {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
}

.visitor-company {
  font-size: 0.85rem;
  color: #666;
  margin-top: 1px;
}

.status-badge {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.status-in .status-badge {
  background: #e8f8f0;
  color: #27ae60;
}

.status-out .status-badge {
  background: #f0f0f0;
  color: #777;
}

.card-body {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 8px;
}

.card-body div {
  margin-bottom: 2px;
}

.card-body .label {
  color: #999;
  font-size: 0.8rem;
}

.card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-checkout {
  background: #27ae60;
  color: #fff;
  font-size: 0.8rem;
  padding: 5px 14px;
}

.btn-checkout:hover {
  background: #219a52;
}

.btn-delete {
  background: #fff;
  color: #e74c3c;
  border: 1px solid #e74c3c;
  font-size: 0.8rem;
  padding: 5px 14px;
}

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

@media (max-width: 480px) {
  h1 {
    font-size: 1.3rem;
  }
  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
