* {
  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: 600px;
  margin: 0 auto;
  padding: 16px;
}

h1 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 20px;
  color: #2c3e50;
}

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

/* Settings */
.settings-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.month-label {
  font-size: 1.1rem;
  font-weight: bold;
  min-width: 120px;
  text-align: center;
}

.nav-btn {
  background: none;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #555;
}

.nav-btn:hover {
  background: #f0f0f0;
}

.limit-setting {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.limit-setting label {
  font-size: 0.9rem;
  color: #555;
}

.limit-setting input {
  width: 60px;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  text-align: center;
}

.btn-save {
  padding: 6px 14px;
  background: #2c3e50;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-save:hover {
  background: #34495e;
}

/* Summary */
.summary-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.summary-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px 8px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.summary-label {
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 6px;
}

.summary-count {
  font-size: 2rem;
  font-weight: bold;
  line-height: 1;
}

.summary-unit {
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
}

.summary-card.office .summary-count { color: #e74c3c; }
.summary-card.remote .summary-count { color: #3498db; }
.summary-card.remaining .summary-count { color: #27ae60; }

.summary-card.remaining.over .summary-count { color: #e74c3c; }

/* Add form */
.add-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.add-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#dateInput {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
}

.type-buttons {
  display: flex;
  gap: 8px;
}

.btn-type {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-type:hover { opacity: 0.85; }

.btn-office {
  background: #fde8e8;
  color: #c0392b;
}

.btn-remote {
  background: #e8f4fd;
  color: #2980b9;
}

.btn-holiday {
  background: #f0f0f0;
  color: #666;
}

/* Record list */
.records-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.record-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.record-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.record-item.office {
  background: #fde8e8;
  color: #c0392b;
}

.record-item.remote {
  background: #e8f4fd;
  color: #2980b9;
}

.record-item.holiday {
  background: #f0f0f0;
  color: #666;
}

.record-date {
  font-weight: 500;
}

.record-type {
  font-size: 0.85rem;
  font-weight: bold;
}

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

.btn-delete:hover {
  color: #e74c3c;
}

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

@media (max-width: 400px) {
  .summary-count {
    font-size: 1.6rem;
  }

  .summary-label {
    font-size: 0.7rem;
  }
}
