* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f7fa;
  color: #333;
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
h1 { font-size: 1.4rem; }
.btn-primary {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary {
  background: #e5e7eb;
  color: #333;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn-secondary:hover { background: #d1d5db; }
.btn-sm {
  padding: 4px 8px;
  font-size: 0.75rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin: 0 2px;
}
.btn-edit { background: #fbbf24; color: #333; }
.btn-delete { background: #ef4444; color: #fff; }

#filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
#filters select {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.85rem;
  background: #fff;
}

#stats {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.stat-chip {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
thead { background: #f9fafb; }
th, td {
  padding: 10px 12px;
  text-align: left;
  font-size: 0.85rem;
  border-bottom: 1px solid #f3f4f6;
}
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: #2563eb; }
tbody tr:hover { background: #f0f4ff; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-応募済み   { background: #dbeafe; color: #1e40af; }
.badge-書類選考中 { background: #fef3c7; color: #92400e; }
.badge-面接予定   { background: #d1fae5; color: #065f46; }
.badge-結果待ち   { background: #e0e7ff; color: #3730a3; }
.badge-採用       { background: #bbf7d0; color: #14532d; }
.badge-不採用     { background: #fecaca; color: #991b1b; }
.badge-辞退       { background: #e5e7eb; color: #374151; }
.badge-候補       { background: #f3e8ff; color: #6b21a8; }
.badge-リサーチ   { background: #fef9c3; color: #854d0e; }

.deadline-warn { color: #dc2626; font-weight: 600; }
.deadline-soon { color: #ea580c; }

a.job-link {
  color: #2563eb;
  text-decoration: none;
  font-size: 0.75rem;
}
a.job-link:hover { text-decoration: underline; }

.memo-cell {
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Modal */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
#modal-overlay.hidden { display: none; }
#modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}
#modal h2 { margin-bottom: 16px; font-size: 1.1rem; }
#modal label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}
#modal input, #modal select, #modal textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.85rem;
}
.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

@media (max-width: 768px) {
  th:nth-child(7), td:nth-child(7) { display: none; }
  th, td { padding: 8px 6px; font-size: 0.78rem; }
}
