:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #17191c;
  --muted: #68707d;
  --border: #e4e7eb;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --danger: #b42318;
  --success: #067647;
  --warning: #b54708;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  height: 68px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.3px;
}

.logo span {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  font-weight: 650;
}

.btn:hover {
  background: #f7f8fa;
}

.btn-primary {
  color: white;
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.hero {
  padding: 110px 0 120px;
  text-align: center;
}

.hero h1 {
  max-width: 760px;
  margin: 0 auto;
  font-size: clamp(42px, 7vw, 68px);
  line-height: 1.02;
  letter-spacing: -2.8px;
}

.hero p {
  max-width: 620px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.hero-note {
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
}

.auth-wrap {
  width: min(440px, calc(100% - 32px));
  margin: 70px auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.auth-card {
  padding: 30px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -.7px;
}

.auth-card > p {
  color: var(--muted);
  margin: 0 0 26px;
}

.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d7dce2;
  background: #fff;
  border-radius: 9px;
  padding: 11px 12px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow:
    0 0 0 3px
    rgba(37, 99, 235, .10);
}

.full {
  width: 100%;
}

.form-footer {
  margin-top: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.link {
  color: var(--primary);
  font-weight: 650;
  text-decoration: none;
}

.page {
  padding: 42px 0 80px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.page-header h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -.7px;
}

.page-header p {
  margin: 7px 0 0;
  color: var(--muted);
}

.list {
  display: grid;
  gap: 12px;
}

.job-card {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-decoration: none;
}

.job-card:hover {
  border-color: #cdd4dd;
}

.job-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.job-meta {
  color: var(--muted);
  font-size: 14px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.status-PASS {
  background: #ecfdf3;
  color: var(--success);
}

.status-REVIEW {
  background: #fff7ed;
  color: var(--warning);
}

.status-FAIL,
.status-error {
  background: #fef3f2;
  color: var(--danger);
}

.status-processing,
.status-queued {
  background: #eff6ff;
  color: var(--primary);
}

.empty {
  padding: 55px 25px;
  text-align: center;
}

.empty h3 {
  margin: 0 0 8px;
}

.empty p {
  color: var(--muted);
  margin: 0 0 22px;
}

.form-card {
  max-width: 650px;
  padding: 28px;
}

.upload-box {
  border: 1px dashed #b7bec8;
  border-radius: 10px;
  padding: 20px;
  background: #fafbfc;
}

.file-name {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.notice {
  margin: 18px 0;
  padding: 13px 15px;
  border-radius: 9px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 14px;
  line-height: 1.5;
}

.error {
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 9px;
  background: #fef3f2;
  color: var(--danger);
  font-size: 14px;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
}

.section {
  padding: 24px;
  margin-bottom: 18px;
}

.section h2 {
  font-size: 18px;
  margin: 0 0 17px;
}

.copy-value {
  white-space: pre-wrap;
  line-height: 1.65;
}

.bullets {
  padding-left: 22px;
  margin: 0;
}

.bullets li {
  margin-bottom: 10px;
  line-height: 1.55;
}

.gate {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.gate:last-child {
  border-bottom: 0;
}

.gate-name {
  font-size: 14px;
}

.gate-status {
  font-size: 13px;
  font-weight: 750;
}

.sidebar-card {
  padding: 22px;
}

.sidebar-card h3 {
  margin: 0 0 17px;
}

.detail-row {
  margin-bottom: 14px;
}

.detail-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.detail-value {
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.loading {
  padding: 80px 0;
  text-align: center;
  color: var(--muted);
}

.spinner {
  width: 30px;
  height: 30px;
  margin: 0 auto 15px;
  border: 3px solid #dbe3ec;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 760px) {
  .hero {
    padding-top: 75px;
  }

  .hero h1 {
    letter-spacing: -1.8px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .page-header {
    flex-direction: column;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .job-card {
    align-items: flex-start;
  }
}

/* SafeListing frontend UX cleanup */

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  margin: 0;
  border: 1px solid #d7dce2;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.file-picker:hover {
  background: #f3f5f7;
}

.selected-file-name {
  display: inline-block;
  margin-left: 10px;
  color: var(--muted);
  font-size: 14px;
  vertical-align: middle;
}

.readonly-field {
  background: #f7f8fa;
  color: #4b5563;
  cursor: default;
}
