/* HIS Hiring – shared styles */
:root {
  --blue: #1E5AA8;
  --blue-dark: #163F78;
  --blue-soft: #DCEBFA;
  --ground: #EAF2FB;
  --lane: #D9E7F6;
  --line: #B9CDE6;
  --ink: #0F2540;
  --muted: #4A5D75;
  --warn-bg: #FDE9D9;
  --warn-ink: #8A3B06;
  --error: #A33A0A;
  --radius: 12px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); }
h1, h2, h3 { font-family: "Space Grotesk", Inter, sans-serif; margin: 0; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--blue); color: var(--ink); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); color: #fff; }
.btn.danger { color: var(--warn-ink); border-color: #E3B9A0; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: default; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .legend { font-size: 13px; font-weight: 600; }
.input, select.input, textarea.input {
  min-height: 46px; border-radius: 10px; border: 1px solid var(--line);
  padding: 10px 12px; background: #fff; color: var(--ink); width: 100%;
}
.input:focus, .btn:focus-visible, .pill input:focus-visible + span { outline: 3px solid #9CC1EC; outline-offset: 1px; }
fieldset { border: none; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }

.check { min-height: 44px; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.check input { accent-color: var(--blue); width: 18px; height: 18px; margin: 0; flex: none; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 22px; border: 1px solid var(--line); background: #fff;
  font-weight: 600; font-size: 15px; cursor: pointer;
}
.pill input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }

.card { background: #fff; border-radius: 16px; padding: 20px; box-shadow: 0 4px 16px rgba(15,37,64,.07); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--error); font-weight: 600; font-size: 14px; }
.tag-minor { font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; background: var(--warn-bg); color: var(--warn-ink); white-space: nowrap; }
.notice { padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); }
.notice.ok { background: var(--blue-soft); color: var(--blue-dark); font-weight: 600; }

/* Top bar used on staff pages */
.topbar {
  background: var(--blue); color: #fff; padding: 12px 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 20px; color: #fff; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: #fff; color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.topbar .tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.topbar .btn { min-height: 40px; }
.topbar .btn.ghost { background: transparent; color: #fff; border-color: #fff; }
.topbar select.input { min-height: 40px; width: auto; min-width: 170px; border: none; padding: 0 10px; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 20px 24px 40px; }

/* Login */
.login { max-width: 400px; margin: 60px auto; display: flex; flex-direction: column; gap: 14px; }

/* Board */
.jobs-row { margin-bottom: 14px; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.board-area { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.board-scroll { flex: 999 1 600px; min-width: 0; overflow-x: auto; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; min-width: 760px; }
.lane { background: var(--lane); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 420px; }
.lane-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; }
.lane-head h2 { font-size: 15px; font-family: Inter, sans-serif; }
.count { min-width: 26px; height: 24px; padding: 0 8px; border-radius: 12px; background: #fff; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.app-card {
  text-align: left; cursor: pointer; background: #fff; border-radius: 12px; padding: 12px;
  display: flex; flex-direction: column; gap: 5px; border: 2px solid transparent;
  box-shadow: 0 1px 2px rgba(15,37,64,.08); width: 100%;
}
.app-card.selected { border-color: var(--blue); box-shadow: 0 0 0 3px #C9DCF3; }
.app-card .row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.app-card .name { font-weight: 700; font-size: 15px; }
.app-card .meta { font-size: 12px; font-weight: 600; color: var(--blue); }
.empty { padding: 16px 8px; font-size: 13px; color: var(--muted); text-align: center; margin: 0; }

.detail { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.detail .status { font-size: 12px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .06em; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; font-size: 14px; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.box { padding: 12px; border-radius: 12px; background: #F3F7FC; display: flex; flex-direction: column; gap: 8px; }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.history li { border-left: 3px solid var(--line); padding-left: 10px; }

/* Admin tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #E3ECF6; vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
.section { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.inline-form .field { flex: 1 1 180px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 600; z-index: 50; max-width: 90vw;
}
