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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.5;
}

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

h1 {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 20px;
}

section {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

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

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  outline: none;
}

input[type="text"]:focus,
input[type="number"]:focus {
  border-color: #4a90d9;
}

button {
  padding: 10px;
  background: #4a90d9;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: bold;
}

button:hover {
  background: #3a7bc8;
}

.staff-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.staff-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 14px;
  position: relative;
}

.staff-name {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.meters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meter-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #555;
}

.meter-bar-bg {
  width: 100%;
  height: 12px;
  background: #e8e8e8;
  border-radius: 6px;
  overflow: hidden;
}

.meter-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 0.3s;
}

.bar-ok    { background: #4caf50; }
.bar-warn  { background: #ff9800; }
.bar-over  { background: #f44336; }

.status-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 6px;
}

.badge-ok   { background: #e8f5e9; color: #388e3c; }
.badge-warn { background: #fff3e0; color: #e65100; }
.badge-over { background: #ffebee; color: #c62828; }

.remaining {
  font-size: 0.82rem;
  margin-top: 2px;
}

.remaining.warn { color: #e65100; }
.remaining.over { color: #c62828; font-weight: bold; }

.delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.delete-btn:hover {
  background: #f5f5f5;
  color: #e53935;
}

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

@media (min-width: 500px) {
  .form-row {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .form-row input[type="text"] {
    flex: 1 1 140px;
  }

  .form-row input[type="number"] {
    flex: 1 1 120px;
  }

  .form-row button {
    flex: 0 0 80px;
  }
}
