* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", sans-serif; background: #f5f7fa; color: #333; line-height: 1.6; }

/* Navbar */
.navbar { background: #1f4e79; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 56px; }
.nav-brand a { color: #fff; text-decoration: none; font-weight: bold; font-size: 16px; }
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links a { color: #d9e7f5; text-decoration: none; font-size: 14px; }
.nav-links a:hover { color: #fff; }
.nav-user { color: #aac8e4; font-size: 13px; }
.btn-logout { background: rgba(255,255,255,0.15); padding: 4px 12px; border-radius: 4px; }

/* Container */
.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }

/* Login */
.login-container { max-width: 400px; margin: 80px auto; background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.login-container h1 { text-align: center; margin-bottom: 24px; color: #1f4e79; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; color: #555; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #1f4e79; box-shadow: 0 0 0 2px rgba(31,78,121,0.15); }
.form-group textarea { min-height: 80px; resize: vertical; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

/* Buttons */
.btn { display: inline-block; padding: 8px 20px; border: none; border-radius: 4px; font-size: 14px; cursor: pointer; text-decoration: none; text-align: center; }
.btn-primary { background: #1f4e79; color: #fff; }
.btn-primary:hover { background: #163a5c; }
.btn-success { background: #2e7d32; color: #fff; }
.btn-success:hover { background: #1b5e20; }
.btn-danger { background: #c62828; color: #fff; }
.btn-danger:hover { background: #a11d1d; }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-secondary:hover { background: #565e64; }
.btn-sm { padding: 4px 12px; font-size: 13px; }
.btn-full { width: 100%; padding: 12px; font-size: 16px; }
.btn-recommend { background: #e65100; color: #fff; padding: 12px 32px; font-size: 16px; border-radius: 6px; }
.btn-recommend:hover { background: #bf360c; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fdecea; color: #c62828; border: 1px solid #f5c6cb; }
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }

/* Cards */
.card { background: #fff; border-radius: 8px; padding: 24px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.card h2 { color: #1f4e79; margin-bottom: 12px; font-size: 18px; }

/* Dashboard stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 8px; padding: 20px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.stat-card .stat-value { font-size: 36px; font-weight: bold; color: #1f4e79; }
.stat-card .stat-label { font-size: 14px; color: #777; margin-top: 4px; }

/* Tables */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
th { background: #1f4e79; color: #fff; padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 600; }
td { padding: 10px 16px; border-bottom: 1px solid #eee; font-size: 14px; }
tr:hover td { background: #f8f9fb; }

/* Badges */
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-active { background: #e8f5e9; color: #2e7d32; }
.badge-inactive { background: #fdecea; color: #c62828; }
.badge-public { background: #e3f2fd; color: #1565c0; }
.badge-private { background: #fff3e0; color: #e65100; }
.badge-closed { background: #f5f5f5; color: #777; }

/* Search / Filter bar */
.filter-bar { background: #fff; padding: 16px 20px; border-radius: 8px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filter-bar .form-group { margin-bottom: 0; }
.filter-bar input, .filter-bar select { padding: 8px 12px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 24px; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: 4px; text-decoration: none; font-size: 14px; }
.pagination a { background: #fff; color: #1f4e79; border: 1px solid #ddd; }
.pagination a:hover { background: #e3f2fd; }
.pagination .current { background: #1f4e79; color: #fff; border: 1px solid #1f4e79; }

/* Detail page */
.detail-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.detail-header h1 { font-size: 22px; color: #1f4e79; }
.detail-section { margin-bottom: 16px; }
.detail-section h2 { font-size: 16px; color: #1f4e79; border-left: 4px solid #1f4e79; padding-left: 12px; margin-bottom: 12px; }
.detail-section h3 { font-size: 15px; color: #1f4e79; border-bottom: 2px solid #d9e7f5; padding-bottom: 4px; margin-bottom: 8px; }
.section-body { font-size: 14px; line-height: 1.8; white-space: pre-wrap; color: #444; }
.detail-table { width: 100%; border-collapse: collapse; box-shadow: none; }
.detail-table th { background: #e8f0f8; color: #1f4e79; font-weight: 600; text-align: left; padding: 10px 16px; width: 140px; font-size: 13px; border-bottom: 1px solid #d9e7f5; }
.detail-table td { padding: 10px 16px; border-bottom: 1px solid #eee; font-size: 14px; }
.raw-toggle { cursor: pointer; font-size: 14px; color: #1f4e79; font-weight: 600; padding: 4px 0; }
.raw-toggle:hover { color: #163a5c; }
.raw-body { margin-top: 12px; padding: 16px; background: #f8f9fb; border-radius: 4px; font-size: 13px; line-height: 1.7; color: #555; }
.detail-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-bottom: 20px; }
.meta-item { padding: 8px 0; }
.meta-item .meta-label { font-size: 12px; color: #888; text-transform: uppercase; }
.meta-item .meta-value { font-size: 14px; font-weight: 500; }

/* Page header */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-header h1 { font-size: 22px; color: #1f4e79; }

/* Action bar */
.action-bar { display: flex; gap: 8px; margin-bottom: 16px; }

/* Job card list (Crowdagent-like) */
.job-card-list { display: flex; flex-direction: column; gap: 12px; }
.job-card { display: block; background: #fff; border-radius: 8px; padding: 18px 22px; text-decoration: none; color: inherit; box-shadow: 0 1px 4px rgba(0,0,0,0.06); transition: all 0.15s ease; border: 1px solid transparent; }
.job-card:hover { box-shadow: 0 4px 12px rgba(31,78,121,0.15); border-color: #1f4e79; transform: translateY(-1px); }
.job-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.job-card-title { font-size: 16px; font-weight: 700; color: #1f4e79; line-height: 1.4; flex: 1; }
.job-card-code { font-size: 12px; color: #888; font-family: 'Consolas', monospace; white-space: nowrap; }
.job-card-company { font-size: 14px; color: #555; font-weight: 600; margin-bottom: 10px; }
.job-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.job-tag { display: inline-block; padding: 3px 10px; border-radius: 12px; background: #e8f0f8; color: #1f4e79; font-size: 12px; font-weight: 500; }
.job-tag-loc { background: #f0f7ff; color: #0c5394; }
.job-tag-salary { background: #fff4e5; color: #c05600; }
.job-tag-fee { background: #ffe5e5; color: #b33; font-weight: 700; }
.job-card-section { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e0e0e0; }
.job-card-label { font-size: 11px; color: #888; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.job-card-text { font-size: 13px; color: #444; line-height: 1.6; }

/* FEE card (emphasized) */
.fee-card { border-left: 4px solid #e65100; }
.fee-card h2 { color: #e65100; }
.fee-value { font-size: 15px; font-weight: 700; color: #e65100; }

/* Search form with accordions */
.search-form { background: #fff; border-radius: 8px; padding: 16px 20px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.search-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.search-row:last-child { border-bottom: none; }
.search-label { font-size: 13px; font-weight: 700; color: #1f4e79; min-width: 80px; flex-shrink: 0; }
.search-input { flex: 1; padding: 8px 12px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; }
.search-input:focus { outline: none; border-color: #1f4e79; box-shadow: 0 0 0 2px rgba(31,78,121,0.15); }

.search-accordion { border-bottom: 1px solid #f0f0f0; }
.search-accordion > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}
.search-accordion > summary::-webkit-details-marker { display: none; }
.search-accordion > summary::before {
  content: "▶";
  color: #1f4e79;
  font-size: 10px;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.search-accordion[open] > summary::before { transform: rotate(90deg); }
.search-accordion > summary:hover { background: #f8f9fb; }

.chip-group { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.chip { display: inline-block; padding: 2px 10px; background: #1f4e79; color: #fff; border-radius: 12px; font-size: 12px; font-weight: 500; }

.accordion-body { padding: 8px 0 14px 26px; }
.region-block { margin-bottom: 12px; }
.region-title { font-size: 12px; color: #888; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 6px; text-transform: uppercase; }
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #f8f9fb;
  border: 1px solid #eee;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.1s;
}
.check-item:hover { background: #e3f2fd; border-color: #1f4e79; }
.check-item input[type="checkbox"] { cursor: pointer; accent-color: #1f4e79; }
.check-item input[type="checkbox"]:checked + span { color: #1f4e79; font-weight: 700; }

/* Responsive */
@media (max-width: 768px) {
  .navbar { flex-direction: column; height: auto; padding: 12px; }
  .nav-links { flex-wrap: wrap; justify-content: center; margin-top: 8px; }
  .filter-bar { flex-direction: column; }
  .detail-meta { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .job-card-header { flex-direction: column; }
}
