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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  background: white;
  padding: 30px;
  margin-bottom: 20px;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.header p {
  color: #86868b;
  font-size: 1.1rem;
}

.nav {
  display: flex;
  gap: 10px;
  background: white;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nav-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #86868b;
  cursor: pointer;
  transition: all 0.2s;
}

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

.nav-btn.active {
  background: #007aff;
  color: white;
}

.card {
  background: white;
  padding: 24px;
  margin-bottom: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.card h2 {
  margin-bottom: 8px;
  font-size: 1.8rem;
}

.card h3 {
  margin-bottom: 16px;
  font-size: 1.4rem;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #007aff;
  color: white;
}

.btn-primary:hover {
  background: #0051d5;
  transform: translateY(-1px);
}

.btn-danger {
  background: #ff3b30;
  color: white;
}

.btn-danger:hover {
  background: #c9302c;
}

.btn-secondary {
  background: #f5f5f7;
  color: #1d1d1f;
}

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

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

input,
select,
textarea {
  width: 100%;
  padding: 14px;
  margin: 8px 0 16px 0;
  border: 1px solid #d1d1d6;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

label {
  display: block;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 4px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #86868b;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #86868b;
  font-size: 18px;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-right: 8px;
}

.badge-blue {
  background: #e5f2ff;
  color: #007aff;
}

.badge-green {
  background: #e5f9f0;
  color: #34c759;
}

.badge-gray {
  background: #f5f5f7;
  color: #86868b;
}

.voto-display {
  font-size: 2rem;
  font-weight: 700;
  color: #007aff;
  margin: 12px 0;
}

.giudizio-box {
  background: #f5f5f7;
  padding: 16px;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.hidden {
  display: none;
}

.error {
  background: #ffebee;
  color: #c9302c;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.success {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}
