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

body {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
  background: #f4f6f9;
  color: #333;
  line-height: 1.5;
}

header {
  background: #1a73e8;
  color: #fff;
  padding: 16px 24px;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 12px;
}

header .meta {
  font-size: 12px;
  font-weight: normal;
  opacity: 0.85;
  margin-left: auto;
}

.search-box {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.search-row input {
  flex: 1;
  min-width: 200px;
  padding: 9px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}

.search-row input:focus { border-color: #1a73e8; }

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-row select {
  padding: 7px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
  outline: none;
}

.filter-row select:focus { border-color: #1a73e8; }

.reset-btn {
  padding: 7px 14px;
  background: #f1f3f4;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  color: #555;
}

.reset-btn:hover { background: #e0e0e0; }

.tag-filter-box {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  background: #f8fafd;
  border: 1px solid #e0e7f0;
  border-radius: 8px;
}

.tag-filter-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.tag-filter-title {
  font-size: 13px;
  font-weight: bold;
  color: #333;
}

.tag-mode-select {
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
}

.tag-clear-btn {
  padding: 5px 10px;
  background: #f1f3f4;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  color: #555;
}

.tag-clear-btn:hover { background: #e0e0e0; }

.tag-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  background: #fff;
  border: 1px solid #dfe5ee;
  border-radius: 999px;
  padding: 5px 9px;
  cursor: pointer;
  user-select: none;
}

.tag-check:hover {
  background: #eef4ff;
  border-color: #b7cdf7;
}

.tag-check input { cursor: pointer; }

.tag-check.active {
  background: #e8f0fe;
  border-color: #1a73e8;
  color: #1a73e8;
  font-weight: bold;
}

.tag-check-desc {
  color: #6e7781;
  font-size: 10px;
  margin-left: 6px;
  font-weight: normal;
}

.tag-check.active .tag-check-desc {
  color: #1a73e8;
}

.result-count {
  padding: 10px 24px 4px;
  font-size: 13px;
  color: #666;
  display: flex;
  gap: 12px;
  align-items: center;
}

.load-more-hint {
  color: #1a73e8;
  cursor: pointer;
  text-decoration: underline;
}

.job-list {
  padding: 8px 24px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.job-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  padding: 16px;
  cursor: pointer;
  border-left: 4px solid #ccc;
  transition: box-shadow 0.2s, transform 0.1s;
}

.job-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
  transform: translateY(-2px);
}

.job-card.public { border-left-color: #34a853; }
.job-card.not-public { border-left-color: #ea4335; }
.job-card.closed { border-left-color: #9aa0a6; }
.job-card.other { border-left-color: #fbbc04; }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 8px;
}

.card-id {
  font-size: 11px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
  font-weight: bold;
}

.badge-public { background: #e6f4ea; color: #1e7e34; }
.badge-notpublic { background: #fce8e6; color: #c5221f; }
.badge-closed { background: #f1f3f4; color: #5f6368; }
.badge-other { background: #fef7e0; color: #b06000; }

.card-company {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 3px;
}

.card-title {
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.tag {
  font-size: 11px;
  background: #f1f3f4;
  border-radius: 4px;
  padding: 2px 7px;
  color: #444;
}

.tag-main { background: #e8f0fe; color: #1a73e8; }
.tag-sheet { background: #f3e8ff; color: #6f42c1; }
.tag-hpstatus { background: #fff3e0; color: #e65100; }

.card-holiday {
  font-size: 11px;
  color: #1a73e8;
  margin-bottom: 6px;
}

.card-shared {
  font-size: 11px;
  color: #7a4f00;
  background: #fef7e0;
  border-radius: 4px;
  padding: 4px 8px;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-content {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.copy-btn {
  font-size: 12px;
  padding: 5px 12px;
  background: #e8f0fe;
  color: #1a73e8;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s;
}

.copy-btn:hover { background: #d2e3fc; }
.copy-btn.copied { background: #e6f4ea; color: #1e7e34; }

.doc-link {
  font-size: 12px;
  padding: 5px 12px;
  background: #fff3e0;
  color: #e65100;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
}

.doc-link:hover { background: #ffe0b2; }
.doc-link.disabled { background: #f1f3f4; color: #888; }

.detail-hint {
  font-size: 11px;
  color: #bbb;
  margin-left: auto;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 860px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  animation: slideUp 0.2s ease;
}

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

.modal-header {
  position: sticky;
  top: 0;
  background: #fff;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  z-index: 10;
}

.modal-header-left { flex: 1; }

.modal-id { font-size: 12px; color: #888; margin-bottom: 4px; }
.modal-company { font-size: 18px; font-weight: bold; }
.modal-title { font-size: 14px; color: #555; margin-top: 2px; }

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #888;
  padding: 2px 6px;
  border-radius: 4px;
}

.modal-close:hover { background: #f1f3f4; }

.modal-body { padding: 20px; }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.modal-copy-btn {
  padding: 8px 18px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-weight: bold;
}

.modal-copy-btn:hover { background: #1558b0; }
.modal-copy-btn.copied { background: #34a853; }

.modal-doc-link {
  padding: 8px 18px;
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffcc80;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  font-weight: bold;
}

.modal-doc-link:hover { background: #ffe0b2; }
.modal-doc-link.disabled { background: #f1f3f4; color: #888; border-color: #ddd; }

.modal-section { margin-bottom: 20px; }

.modal-section-title {
  font-size: 11px;
  font-weight: bold;
  color: #1a73e8;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e8f0fe;
}

.modal-section-body {
  font-size: 13px;
  color: #333;
  line-height: 1.8;
  white-space: pre-wrap;
}

.modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-chip {
  font-size: 12px;
  background: #f1f3f4;
  border-radius: 5px;
  padding: 3px 10px;
}

.modal-shared-box {
  background: #fef7e0;
  border-left: 3px solid #fbbc04;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 13px;
  color: #5f3b00;
  line-height: 1.7;
  white-space: pre-wrap;
}

.loading {
  text-align: center;
  padding: 60px;
  font-size: 15px;
  color: #888;
}

.no-result {
  text-align: center;
  padding: 60px;
  font-size: 15px;
  color: #aaa;
}
