body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  color: #333;
  background-color: #f8f9fa;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}
h1 {
  font-size: 2rem;
  color: #2c3e50;
  margin: 0;
}
nav {
  display: flex;
  gap: 15px;
}
nav a {
  text-decoration: none;
  color: #555;
  font-weight: 500;
}
nav a.active {
  color: #007bff;
  font-weight: bold;
}
main {
  margin-bottom: 40px;
}
h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #2c3e50;
}
.preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 30px 0;
}
.preview-image {
  width: 100%;
  max-width: 340px;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.generator-form {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin: 30px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0 20px;
}
.generator-form .btn, .generator-form .busy {
  grid-column: 1 / -1;
  margin-top: 10px;
}
.form-group {
  margin-bottom: 15px;
}
label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}
input[type="number"], input[type="email"], input[type="password"], select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}
input[type="checkbox"] {
  width: auto;
  vertical-align: middle;
  margin-right: 6px;
}
.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
}
.btn-primary {
  background-color: #007bff;
}
.btn-primary:hover {
  background-color: #0056b3;
}
.results {
  margin-top: 20px;
  padding: 15px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.busy {
  margin-left: 12px;
  color: #666;
  font-style: italic;
}
.hint {
  color: #666;
  font-size: 0.95rem;
  background: #fff;
  padding: 10px 14px;
  border-radius: 4px;
}
.login-form {
  max-width: 400px;
  margin: 20px auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.login-hint {
  margin-top: 15px;
  font-size: 0.9rem;
  color: #666;
  text-align: center;
}
.login-hint a {
  color: #007bff;
  text-decoration: none;
}
.table-wrap {
  overflow-x: auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.table th, .table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}
.table th {
  background-color: #f2f2f2;
}
.error {
  color: #dc3545;
  font-weight: bold;
}
.success {
  color: #28a745;
  font-weight: bold;
}
/* Toggle-Switch (Admin) */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 26px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #2196f3;
}
input:checked + .slider:before {
  transform: translateX(22px);
}
