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

[hidden] { display: none !important; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f0;
  color: #222;
  min-height: 100vh;
  padding: 24px 16px 48px;
}

.container {
  max-width: 640px;
  margin: 0 auto;
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 28px;
  color: #1a4a2e;
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #1a4a2e;
}

.field-group {
  margin-bottom: 20px;
}

.field-group label,
.group-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.15s;
  background: #fff;
}

input[type="text"]:focus {
  outline: none;
  border-color: #2e7d52;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 1rem;
  padding: 10px 14px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  transition: border-color 0.15s, background 0.15s;
  background: #fff;
}

.radio-label:hover {
  border-color: #2e7d52;
  background: #f0faf4;
}

.radio-label input[type="radio"],
.radio-label input[type="checkbox"] {
  accent-color: #2e7d52;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.radio-label.taken {
  opacity: 0.55;
  background: #f5f5f5;
  border-color: #e0e0e0;
  cursor: default;
  pointer-events: none;
}

.taken-badge {
  margin-left: auto;
  font-size: 0.78rem;
  color: #888;
  font-style: italic;
}

.baguette-status {
  font-size: 0.92rem;
  color: #555;
  margin-bottom: 10px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.stepper-btn {
  width: 36px;
  height: 36px;
  font-size: 1.3rem;
  line-height: 1;
  background: #e8f5ee;
  color: #1a4a2e;
  border: 1.5px solid #b8dfc6;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.stepper-btn:hover:not(:disabled) {
  background: #d4e8da;
}

.stepper-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.stepper-value {
  font-size: 1.4rem;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
  color: #1a4a2e;
}

.stepper-label {
  font-size: 0.92rem;
  color: #555;
}

#section-food {
  border-top: 2px solid #d4e8da;
  margin-top: 24px;
  padding-top: 20px;
}

.notice {
  background: #e8f5ee;
  border-left: 4px solid #2e7d52;
  padding: 12px 14px;
  border-radius: 0 6px 6px 0;
  font-size: 0.92rem;
  color: #1a4a2e;
  margin-bottom: 20px;
}

fieldset {
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  background: #fff;
}

legend {
  font-weight: 600;
  font-size: 1rem;
  color: #1a4a2e;
  padding: 0 6px;
}

#salad-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.contribution-list {
  list-style: none;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contribution-list li {
  background: #f0faf4;
  border: 1px solid #b8dfc6;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.95rem;
  color: #1a4a2e;
}

.contribution-list li.pending {
  background: #fafaf0;
  border-color: #d4d488;
  color: #555;
  font-style: italic;
}

.add-input-area {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.add-input-area input {
  flex: 1;
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 13px;
  background: #2e7d52;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 24px;
  transition: background 0.15s;
}

.btn-primary:hover:not(:disabled) {
  background: #1a5c3a;
}

.btn-primary:disabled {
  background: #8abfa2;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 10px 16px;
  background: #e8f5ee;
  color: #1a4a2e;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1.5px solid #b8dfc6;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

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

.full-msg {
  font-size: 0.9rem;
  color: #888;
  font-style: italic;
  margin-top: 6px;
}

.taken-msg {
  color: #888;
  font-style: italic;
  font-size: 0.95rem;
}

.error-msg {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.92rem;
  margin-top: 12px;
}

.success-box {
  background: #e8f5ee;
  border: 2px solid #2e7d52;
  border-radius: 10px;
  padding: 32px;
  text-align: center;
  margin-top: 24px;
}

.success-icon {
  display: block;
  font-size: 2.5rem;
  color: #2e7d52;
  margin-bottom: 12px;
}

.success-box p {
  font-size: 1.1rem;
  color: #1a4a2e;
  font-weight: 500;
}

.loading {
  color: #999;
  font-style: italic;
  font-size: 0.9rem;
}

/* Admin page */
.admin-section {
  margin-bottom: 40px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th {
  background: #1a4a2e;
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
}

.admin-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: top;
}

.admin-table tr:nth-child(even) td {
  background: #f9f9f9;
}

.admin-table tr:hover td {
  background: #f0faf4;
}

.badge {
  display: inline-block;
  background: #e8f5ee;
  color: #1a4a2e;
  border: 1px solid #b8dfc6;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.82rem;
}

.badge-yes {
  background: #e8f5ee;
  color: #1a4a2e;
  border-color: #b8dfc6;
}

.badge-no {
  background: #f5f5f5;
  color: #888;
  border-color: #ddd;
}

.no-data {
  color: #999;
  font-style: italic;
  padding: 12px 0;
}

.refresh-btn {
  display: inline-block;
  padding: 8px 16px;
  background: #2e7d52;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 20px;
}

.refresh-btn:hover {
  background: #1a5c3a;
}

.timestamp {
  font-size: 0.8rem;
  color: #999;
}
