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

body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

.section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #eee;
}

.section:last-child {
  border-bottom: none;
}

h2 {
  margin-bottom: 15px;
  color: #555;
}

.method-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.method-btn, .method-btn-single, .method-btn-all {
  flex: 1;
  padding: 12px;
  border: 2px solid #ddd;
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.method-btn::before, .method-btn-single::before, .method-btn-all::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.method-btn:hover, .method-btn-single:hover, .method-btn-all:hover {
  border-color: #333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.method-btn.active, .method-btn-single.active, .method-btn-all.active {
  background: linear-gradient(145deg, #000000, #1a1a1a);
  color: white;
  border-color: #000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,255,255,0.1);
  transform: translateY(0);
}

.method-btn:active, .method-btn-single:active, .method-btn-all:active {
  transform: scale(0.95) translateY(1px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2), inset 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.1s;
}

.method-btn:active::before, .method-btn-single:active::before, .method-btn-all:active::before {
  width: 300px;
  height: 300px;
  transition: width 0s, height 0s;
}

input, select, textarea, button {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

button {
  background: linear-gradient(145deg, #007bff, #0056b3);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,123,255,0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover {
  background: linear-gradient(145deg, #0056b3, #004085);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,123,255,0.4);
}

button:active {
  transform: scale(0.96) translateY(1px);
  box-shadow: 0 2px 4px rgba(0,123,255,0.3), inset 0 2px 4px rgba(0,0,0,0.2);
}

button:active::after {
  width: 300px;
  height: 300px;
  transition: width 0s, height 0s;
}

.user-item {
  padding: 10px;
  margin: 10px 0;
  background: #f9f9f9;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-info {
  flex: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.municipality-stats {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 6px;
}

.municipality-stats h3 {
  margin-bottom: 10px;
  color: #333;
}

.stat-item {
  padding: 5px 0;
  border-bottom: 1px solid #eee;
}

.stat-total {
  padding: 10px 0;
  font-size: 16px;
  color: #007bff;
  margin-top: 10px;
  border-top: 2px solid #007bff;
}

.grand-total {
  text-align: center;
  font-size: 20px;
  padding: 15px;
  background: #007bff;
  color: white;
  border-radius: 6px;
  font-weight: bold;
}

.delete-btn {
  width: auto;
  padding: 5px 15px;
  background: #dc3545;
  margin: 0;
}

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

#messageResult, #singleResult, #allResult {
  margin-top: 15px;
  padding: 15px;
  border-radius: 8px;
  display: none;
  font-weight: 600;
  font-size: 14px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#messageResult.success, #singleResult.success, #allResult.success {
  background: linear-gradient(145deg, #d4edda, #c3e6cb);
  color: #155724;
  border: 2px solid #28a745;
  display: block;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

#messageResult.error, #singleResult.error, #allResult.error {
  background: linear-gradient(145deg, #f8d7da, #f5c6cb);
  color: #721c24;
  border: 2px solid #dc3545;
  display: block;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.char-counter {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
  text-align: right;
}

.char-counter.warning {
  color: #ff9800;
  font-weight: bold;
}

.char-counter.error {
  color: #f44336;
  font-weight: bold;
}
