:root {
  --brand: #0b3d78;
  --brand-dark: #072a54;
  --brand-light: #e8f0fb;
  --text: #1a1a1a;
  --muted: #5b6472;
  --bg: #ffffff;
  --border: #dfe4ea;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

header.site {
  background: var(--brand);
  color: #fff;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fff;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

header.site .company-name {
  font-weight: 600;
  font-size: 18px;
}

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

h1 { font-size: 26px; margin: 0 0 8px; }
h2 { font-size: 20px; }
p.lead { color: var(--muted); margin-bottom: 28px; }

.job-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.job-card h3 { margin: 0 0 6px; font-size: 18px; }
.job-card .meta { color: var(--muted); font-size: 14px; }

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 15px;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); }

a.back-link { color: var(--brand); text-decoration: none; font-size: 14px; }

.job-detail .meta { color: var(--muted); margin-bottom: 20px; }
.job-detail .description { white-space: pre-wrap; margin-bottom: 32px; }

form.apply-form {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.field { margin-bottom: 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
input[type=text], input[type=email], input[type=tel], textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
}
textarea { min-height: 90px; resize: vertical; }
input[type=file] { padding: 8px 0; }
.hint { color: var(--muted); font-size: 13px; margin-top: 4px; }

.success-box {
  background: var(--brand-light);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

table.candidates {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.candidates th, table.candidates td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
table.candidates th { color: var(--muted); font-weight: 600; }

.error-box {
  background: #fdecea;
  color: #8a1f11;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}

.btn-sm {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.btn-sm:hover { background: var(--brand-dark); }

.stat-row { display: flex; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.stat-tile {
  background: var(--brand-light);
  border-radius: 12px;
  padding: 18px 24px;
  min-width: 150px;
}
.stat-tile .stat-value { font-size: 30px; font-weight: 700; color: var(--brand); line-height: 1.1; }
.stat-tile .stat-label { font-size: 13px; color: var(--muted); margin-top: 6px; }

.funnel { margin-bottom: 32px; }
.funnel-step { margin-bottom: 16px; }
.funnel-step-head {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
}
.funnel-step-head .funnel-name { font-weight: 600; }
.funnel-step-head .funnel-count { color: var(--brand); font-weight: 700; }
.funnel-conv { color: var(--muted); font-weight: 400; font-size: 12px; }
.funnel-bar-track {
  background: var(--brand-light);
  border-radius: 6px;
  height: 22px;
  overflow: hidden;
}
.funnel-bar {
  background: var(--brand);
  height: 100%;
  border-radius: 6px;
}

.fill-list { margin-bottom: 8px; }
.fill-row { margin-bottom: 14px; }
.fill-head {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
}
.fill-track {
  background: var(--brand-light);
  border-radius: 6px;
  height: 14px;
  overflow: hidden;
}
.fill-bar { background: #2f9e44; height: 100%; border-radius: 6px; }
.fill-bar.over { background: var(--brand); }
