* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #e8f5e9, #f5f5f5);
  color: #1f2937;
}
.container {
  max-width: 1100px;
  margin: 32px auto;
  padding: 24px;
}
.card {
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}
h1 {
  margin: 0 0 8px;
  font-size: 2rem;
}
.subtitle {
  margin: 0 0 24px;
  color: #4b5563;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.full { grid-column: 1 / -1; }
label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
}
select, input, button {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  font-size: 1rem;
}
input:focus, select:focus {
  outline: 2px solid #22c55e;
  border-color: #22c55e;
}
button {
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button i {
  font-size: 0.95rem;
}
.btn-primary {
  background: #16a34a;
  color: white;
}
.btn-primary:hover { background: #15803d; }
.btn-secondary {
  background: #e5e7eb;
  color: #111827;
}
.btn-danger {
  background: #dc2626;
  color: white;
  padding: 8px 12px;
  width: auto;
  border-radius: 10px;
}
.btn-danger:hover { background: #b91c1c; }
.message {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  display: none;
}
.message.success {
  display: block;
  background: #dcfce7;
  color: #166534;
}
.message.error {
  display: block;
  background: #fee2e2;
  color: #991b1b;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.result-item {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
}
.result-item strong {
  display: block;
  margin-bottom: 6px;
  color: #111827;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 14px;
}
thead {
  background: #16a34a;
  color: white;
}
th, td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
  font-size: 0.95rem;
}
tbody tr:nth-child(even) { background: #f9fafb; }
.actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.empty {
  color: #6b7280;
  margin-top: 12px;
}
.badge {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 12px;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  font-size: 1rem;
  background: #fff;
  color: #111827;
  cursor: pointer;
  font-weight: normal;
  transition: 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.custom-select-trigger:focus {
  outline: 2px solid #22c55e;
  border-color: #22c55e;
}

.custom-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  display: none;
  overflow: hidden;
  z-index: 1000;
}

.custom-options.open {
  display: block;
}

.custom-option {
  padding: 12px 14px;
  cursor: pointer;
  transition: 0.2s ease;
}

.custom-option:hover {
  background: #f3f4f6;
}

.custom-option.selected {
  background: #dcfce7;
  color: #166534;
  font-weight: bold;
}

.arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .grid { grid-template-columns: 1fr; }
  .container { padding: 16px; }
  .card { padding: 18px; }
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  tr {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 12px;
  }
  td {
    border: none;
    padding: 8px;
  }
  td::before {
    content: attr(data-label);
    display: block;
    font-weight: bold;
    color: #374151;
    margin-bottom: 4px;
  }
}