/* EMDB Custom Styles */
.nav-link { @apply px-3 py-2 rounded text-sm font-medium; }
.nav-link.active { @apply bg-indigo-700 text-white; }
.nav-link:not(.active) { @apply text-indigo-100 hover:bg-indigo-500; }

/* Tailwind @apply が CDN では使えないのでプレーンCSSでも定義 */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-green { background: #d1fae5; color: #065f46; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-gray { background: #f3f4f6; color: #374151; }
.badge-purple { background: #ede9fe; color: #5b21b6; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s;
}
.btn-primary { background: #4f46e5; color: white; }
.btn-primary:hover { background: #4338ca; }
.btn-secondary { background: #e5e7eb; color: #374151; }
.btn-secondary:hover { background: #d1d5db; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }

.card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 1.5rem;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
table.data-table th {
  background: #f9fafb;
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}
table.data-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
}
table.data-table tr:hover td {
  background: #f9fafb;
}

.status-0 { color: #6b7280; }
.status-1 { color: #f59e0b; }
.status-2 { color: #3b82f6; }
.status-3 { color: #10b981; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.modal-content {
  background: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  color: white;
  font-size: 0.875rem;
  z-index: 100;
  animation: fadeIn 0.3s;
}
.toast-success { background: #10b981; }
.toast-error { background: #ef4444; }

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

/* サーチ付きセレクト */
.search-select {
  position: relative;
}
.search-select input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}
.search-select .ss-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: white;
  border: 1px solid #d1d5db;
  border-top: none;
  border-radius: 0 0 0.375rem 0.375rem;
  z-index: 60;
  display: none;
}
.search-select.open .ss-dropdown { display: block; }
.search-select .ss-item {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
}
.search-select .ss-item:hover { background: #f3f4f6; }
.search-select .ss-item.selected { background: #eef2ff; color: #4338ca; }
