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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  padding: 20px;
}

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

h1 {
  margin-bottom: 24px;
  font-size: 24px;
}

section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 20px;
  margin-bottom: 24px;
}

h2 {
  font-size: 18px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #4a90d9;
}

h3 {
  font-size: 15px;
  margin: 0 0 12px;
  grid-column: 1 / -1;
}

form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: #f7f8fa;
  border-radius: 6px;
}

#categoryForm {
  grid-template-columns: 1fr auto;
}

#groupForm {
  grid-template-columns: 1fr 1fr;
}

.form-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  grid-column: 1 / -1;
  margin: 4px 0 -8px;
}

input, select {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
}

input:focus, select:focus {
  outline: none;
  border-color: #4a90d9;
  box-shadow: 0 0 0 2px rgba(74,144,217,0.2);
}

button {
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

button.primary {
  background: #4a90d9;
  color: white;
}

button.primary:hover {
  background: #357abd;
}

#submitBtn, #groupSubmitBtn, #categorySubmitBtn {
  background: #4a90d9;
  color: white;
}

#submitBtn:hover, #groupSubmitBtn:hover, #categorySubmitBtn:hover {
  background: #357abd;
}

.cancel {
  background: #e0e0e0;
  color: #555;
  display: none;
}

.cancel:hover {
  background: #ccc;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background: #f7f8fa;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}

tr:hover {
  background: #f5f7fa;
}

.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-content {
  background: white;
  padding: 24px;
  border-radius: 8px;
  min-width: 320px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-content h3 {
  margin: 0 0 12px;
}

.modal-content label {
  display: block;
  margin: 8px 0 4px;
  font-weight: 600;
  font-size: 13px;
  color: #555;
}

.modal-content select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.bulk-copy {
  background: #f7f8fa;
  padding: 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.bulk-copy h3 {
  width: 100%;
  margin: 0 0 4px;
  font-size: 14px;
}

.bulk-copy label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
}

.bulk-copy select {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}

.bulk-copy button {
  background: #4a90d9;
  color: white;
  padding: 8px 14px;
  font-size: 13px;
}

.bulk-copy button:hover {
  background: #357abd;
}

.status-active {
  color: #27ae60;
  font-weight: 600;
}

.status-expired {
  color: #e74c3c;
  font-weight: 600;
}

.actions {
  white-space: nowrap;
}

.actions button {
  padding: 6px 12px;
  font-size: 12px;
  margin-right: 4px;
}

.btn-edit {
  background: #f39c12;
  color: white;
}

.btn-edit:hover {
  background: #d68910;
}

.btn-copy {
  background: #2ecc71;
  color: white;
}

.btn-copy:hover {
  background: #27ae60;
}

.btn-delete {
  background: #e74c3c;
  color: white;
}

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