* { box-sizing: border-box; }
body { font-family: Arial, sans-serif; margin: 0; background: #f4f5f7; color: #222; }
.topbar { background: #1a2a4a; color: #fff; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; }
.brand { font-size: 20px; font-weight: bold; }
.pilot-tag { background: #e67e22; font-size: 11px; padding: 2px 8px; border-radius: 10px; margin-left: 6px; }
.employee-badge { font-size: 14px; }
main { max-width: 1100px; margin: 20px auto; padding: 0 16px; }
h1 { font-size: 24px; }
.hint { color: #666; font-size: 13px; }
.error { color: #c0392b; font-weight: bold; }

.employee-grid { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.employee-btn { font-size: 18px; padding: 24px 36px; border-radius: 10px; border: 2px solid #1a2a4a; background: #fff; cursor: pointer; }
.employee-btn:hover { background: #1a2a4a; color: #fff; }

.upload-form { display: flex; flex-direction: column; gap: 16px; max-width: 420px; margin-top: 20px; }
.btn-primary { font-size: 18px; padding: 14px 20px; background: #1a2a4a; color: #fff; border: none; border-radius: 8px; cursor: pointer; text-align: center; text-decoration: none; display: inline-block; }
.btn-primary:hover { background: #24365f; }
.footer-link { margin-top: 20px; }

.query-preview { margin: 16px 0; }
.query-thumb { max-height: 260px; border: 3px solid #1a2a4a; border-radius: 8px; display: block; margin-top: 8px; }

.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 20px 0; }
.result-card { position: relative; display: block; background: #fff; border: 2px solid #ddd; border-radius: 10px; padding: 10px; cursor: pointer; }
.result-card:hover { border-color: #999; }
.result-card.selected { border-color: #27ae60; box-shadow: 0 0 0 3px rgba(39,174,96,0.25); }
.select-radio { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; }
.result-thumb { width: 100%; height: 160px; object-fit: contain; background: #f9f9f9; border-radius: 6px; }
.result-meta { font-size: 13px; margin-top: 8px; line-height: 1.5; }
.result-meta .brand { font-weight: bold; }
.select-tag { margin-top: 6px; text-align: center; background: #eee; border-radius: 6px; padding: 4px; font-size: 12px; font-weight: bold; color: #555; }
.result-card.selected .select-tag { background: #27ae60; color: #fff; }

.feedback-panel { background: #fff; border-radius: 10px; padding: 20px; margin-top: 20px; }
.feedback-options { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; }
.fb-opt { font-size: 15px; padding: 12px 16px; border: 2px solid #ccc; border-radius: 8px; cursor: pointer; }
.fb-opt input { margin-right: 8px; }
textarea { width: 100%; min-height: 60px; margin: 12px 0; padding: 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; }

.dash-grid { display: flex; gap: 16px; flex-wrap: wrap; margin: 20px 0; }
.dash-card { background: #fff; border-radius: 10px; padding: 20px; min-width: 140px; text-align: center; }
.dash-num { font-size: 28px; font-weight: bold; color: #1a2a4a; }
.dash-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; background: #fff; }
.dash-table th, .dash-table td { border: 1px solid #ddd; padding: 8px 12px; text-align: left; }
.dash-table th { background: #f0f0f0; }

.login-form { display: flex; flex-direction: column; gap: 8px; max-width: 320px; margin-top: 20px; }
.login-form label { font-size: 13px; color: #555; margin-top: 8px; }
.login-form input { padding: 10px; font-size: 15px; border: 1px solid #ccc; border-radius: 6px; }
.logout-link { color: #ffd; text-decoration: underline; font-size: 13px; }

.prompt-options { display: flex; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.btn-secondary { font-size: 16px; padding: 14px 20px; background: #eee; color: #333; border: 2px solid #ccc; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-block; }
.correction-form { display: flex; flex-direction: column; gap: 6px; max-width: 420px; margin-top: 16px; }
.correction-form label { font-size: 13px; color: #555; margin-top: 10px; }
.correction-form input[type=text], .correction-form textarea { padding: 10px; font-size: 14px; border: 1px solid #ccc; border-radius: 6px; }
.correction-form textarea { min-height: 60px; }

.correction-card { display: flex; gap: 16px; background: #fff; border-radius: 10px; padding: 16px; margin-bottom: 14px; flex-wrap: wrap; align-items: flex-start; }
.correction-card img { width: 130px; height: 130px; object-fit: contain; background: #f9f9f9; border-radius: 6px; }
.correction-arrow { font-size: 22px; align-self: center; color: #999; }
.correction-meta { font-size: 13px; line-height: 1.6; flex: 1; min-width: 200px; }
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: bold; }
.status-PENDING_REVIEW { background: #f1c40f; color: #533; }
.status-APPROVED { background: #2ecc71; color: #053; }
.status-REJECTED { background: #e74c3c; color: #500; }
.review-actions { display: flex; gap: 8px; margin-top: 8px; }
.review-actions button { padding: 6px 14px; border-radius: 6px; border: 1px solid #ccc; cursor: pointer; font-size: 12px; }
.btn-approve { background: #2ecc71; color: #fff; border: none; }
.btn-reject { background: #e74c3c; color: #fff; border: none; }

.better-panel { margin: 16px 0; padding: 16px; border: 3px solid #e67e22; background: #fff7ee; border-radius: 10px; }
.better-title { font-size: 18px; font-weight: bold; color: #b9530a; }
.better-sub { font-size: 16px; margin: 6px 0 12px; }
.btn-better { display: block; width: 100%; min-height: 56px; font-size: 18px; font-weight: bold; padding: 16px 20px; background: #e67e22; color: #fff; border: none; border-radius: 10px; cursor: pointer; text-align: center; text-decoration: none; }
.btn-better:hover { background: #cf6d17; }
.better-panel .prompt-options { display: flex; flex-direction: column; gap: 12px; margin-top: 0; }
.better-panel .prompt-options form { margin: 0; }
.better-panel .btn-secondary { display: block; text-align: center; }

@media (max-width: 600px) {
  .results-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .result-thumb { height: 120px; }
  .feedback-options { flex-direction: column; gap: 10px; }
  .fb-opt { width: 100%; padding: 16px; font-size: 17px; }
  .fb-opt input { width: 22px; height: 22px; vertical-align: middle; }
  .feedback-panel .btn-primary { width: 100%; }
  .correction-form { max-width: none; }
  .correction-form .btn-primary { width: 100%; min-height: 56px; }
}
