/* ===========================================================
   JobKro — Design tokens
   Palette: cool-white paper + deep navy ink + a punchy saffron-orange
   accent (distinct from the generic blue every job board uses).
   Type: Fraunces (display, characterful serif) / Manrope (body) /
   JetBrains Mono (the live counters — gives them a "departure board" feel)
   =========================================================== */

:root {
  --paper: #FFFFFF;
  --panel: #F4F6FA;
  --panel-alt: #ECEFF5;
  --ink: #11162B;
  --ink-soft: #565C72;
  --ink-faint: #8A8FA3;
  --border: #E1E5EE;

  --accent: #FF6B35;
  --accent-dark: #E2541F;
  --accent-soft: #FFEADE;

  --success: #18A464;
  --success-soft: #DEF5E9;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 2px rgba(17, 22, 43, 0.04);
  --shadow-md: 0 4px 14px rgba(17, 22, 43, 0.07);
  --shadow-lg: 0 12px 32px rgba(17, 22, 43, 0.10);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.logo .dot { color: var(--accent); }
.logo .tld { font-size: 0.55em; font-weight: 700; color: var(--ink-faint); letter-spacing: 0.01em; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
}
.nav-links a:hover { color: var(--ink); }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 36px 0 48px;
  color: var(--ink-faint);
  font-size: 14px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer a { color: var(--ink-faint); }
.site-footer a:hover { color: var(--ink-soft); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--radius-md);
  padding: 13px 22px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { box-shadow: var(--shadow-md); }
.btn-primary:disabled {
  background: var(--ink-faint);
  cursor: not-allowed;
  box-shadow: none;
}
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-danger { background: #fff; color: #D14343; border: 1.5px solid #F3D2D2; }
.btn-danger:hover { background: #FDF1F1; }

/* ===== Hero ===== */
.hero {
  padding: 64px 0 48px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--paper) 100%);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 14px;
  max-width: 720px;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero p.lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 0 30px;
}

/* ===== Job list ===== */
.job-grid {
  display: grid;
  gap: 16px;
  padding: 36px 0 64px;
}
.job-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.job-card:hover { box-shadow: var(--shadow-md); border-color: #D8DCE8; }
.job-card .title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  margin: 0 0 4px;
}
.job-card .meta {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0 0 14px;
}
.job-card .meta span:not(:last-child)::after { content: '·'; margin: 0 8px; color: var(--border); }
.tag {
  display: inline-block;
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 999px;
}
.job-card-right { text-align: right; flex-shrink: 0; }
.mini-stats {
  display: flex;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-faint);
  margin-top: 10px;
  justify-content: flex-end;
}
.mini-stats b { color: var(--ink-soft); }

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-faint);
}
.empty-state h3 { font-family: var(--font-display); color: var(--ink); font-size: 22px; }

/* ===== Job detail page ===== */
.job-detail-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
  padding: 40px 0 80px;
  align-items: start;
}
.job-main h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  margin: 0 0 8px;
}
.job-main .company-line {
  font-size: 17px;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.job-main .meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.job-main h2 {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 32px 0 12px;
}
.job-main .prose {
  color: var(--ink-soft);
  font-size: 15.5px;
}
.job-main .prose p { margin: 0 0 14px; }
.job-main .prose ul, .job-main .prose ol { padding-left: 22px; margin: 0 0 14px; }
.job-main .prose li { margin-bottom: 6px; }
.job-main .prose strong, .job-main .prose b { color: var(--ink); }

/* ----- Salary / experience fact tiles ----- */
.fact-tiles { display: flex; gap: 12px; margin-bottom: 26px; flex-wrap: wrap; }
.fact-tile {
  flex: 1; min-width: 150px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px 16px;
}
.fact-tile .fact-icon { font-size: 17px; display: block; margin-bottom: 6px; }
.fact-tile .fact-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); font-weight: 700; margin-bottom: 3px; }
.fact-tile .fact-value { font-family: var(--font-display); font-size: 16.5px; font-weight: 600; color: var(--ink); }

/* ----- Sticky apply panel ----- */
.apply-panel {
  position: sticky;
  top: 96px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px;
}

/* Live "departure board" ticker — the signature element */
.liveboard {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: var(--ink);
  border-radius: var(--radius-md);
  padding: 16px 8px;
  margin-bottom: 22px;
}
.liveboard .stat { text-align: center; padding: 0 4px; }
.liveboard .stat + .stat { border-left: 1px solid rgba(255,255,255,0.12); }
.liveboard .num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
}
.liveboard .num.bump { animation: bump 0.4s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); color: var(--accent);} 100% { transform: scale(1); } }
.liveboard .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
}
.liveboard .pulse-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 5px;
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.liveboard-note {
  font-size: 11.5px;
  color: var(--ink-faint);
  text-align: center;
  margin: -14px 0 22px;
}

/* Drop zone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dropzone .dz-icon { font-size: 28px; margin-bottom: 8px; }
.dropzone .dz-title { font-weight: 700; font-size: 14.5px; }
.dropzone .dz-sub { font-size: 12.5px; color: var(--ink-faint); margin-top: 4px; }
.dropzone input[type=file] { display: none; }

/* Resume preview */
.resume-preview {
  display: none;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.resume-preview.show { display: block; }
.resume-preview .rp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--panel);
  font-size: 13px;
}
.resume-preview .rp-name { font-weight: 700; }
.resume-preview .rp-size { color: var(--ink-faint); }
.resume-preview .rp-remove {
  color: #D14343;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  background: none;
  border: none;
}
.resume-preview .rp-body {
  height: 320px;
  overflow-y: auto;
  background: #fff;
}
.resume-preview .rp-body iframe { width: 100%; height: 100%; border: none; }
.resume-preview .rp-body .docx-render { padding: 16px 18px; font-size: 13px; color: var(--ink-soft); }
.resume-preview .rp-body .no-preview {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; color: var(--ink-faint); font-size: 13px; text-align: center; padding: 20px;
}
.resume-preview .rp-body .no-preview .big { font-size: 36px; margin-bottom: 6px; }

/* Apply form fields */
.apply-fields { margin-top: 18px; display: none; }
.apply-fields.show { display: block; }
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14.5px;
  background: var(--paper);
}
.field input:focus { outline: none; border-color: var(--ink); }

.upload-hint {
  font-size: 11.5px;
  color: var(--ink-faint);
  text-align: center;
  margin-top: 10px;
}

/* ===== Thank-you / highlight upsell ===== */
.center-wrap { max-width: 560px; margin: 0 auto; padding: 70px 24px 100px; text-align: center; }
.check-badge {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--success-soft); color: var(--success);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; margin: 0 auto 18px;
}
.center-wrap h1 { font-family: var(--font-display); font-size: 30px; margin-bottom: 8px; }
.center-wrap p.sub { color: var(--ink-soft); margin-bottom: 36px; }

.highlight-card {
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: left;
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--paper) 60%);
  box-shadow: var(--shadow-md);
}
.highlight-card .badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.highlight-card h3 { font-family: var(--font-display); font-size: 22px; margin: 0 0 10px; }
.highlight-card ul { margin: 0 0 22px; padding-left: 20px; color: var(--ink-soft); font-size: 14.5px; }
.highlight-card li { margin-bottom: 6px; }
.price-row {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 20px;
}
.price-row .price { font-family: var(--font-mono); font-size: 30px; font-weight: 700; }
.price-row .period { color: var(--ink-faint); font-size: 13px; }
.skip-link { display: block; text-align: center; margin-top: 18px; color: var(--ink-faint); font-size: 13.5px; text-decoration: underline; }

/* ===== Forms generic (admin) ===== */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px; background: var(--ink); color: #fff; flex-shrink: 0;
  padding: 24px 0;
}
.admin-sidebar .logo { color: #fff; padding: 0 22px 24px; }
.admin-sidebar a {
  display: block; padding: 11px 22px; color: rgba(255,255,255,0.7); font-size: 14.5px; font-weight: 600;
}
.admin-sidebar a:hover, .admin-sidebar a.active { color: #fff; background: rgba(255,255,255,0.08); }
.admin-main { flex: 1; padding: 36px 40px; background: var(--panel); min-height: 100vh; }
.admin-main h1 { font-family: var(--font-display); font-size: 26px; margin: 0 0 24px; }
.admin-card {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; margin-bottom: 20px;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-faint); padding: 10px 12px; border-bottom: 1.5px solid var(--border); }
.admin-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-table tr:last-child td { border-bottom: none; }
.status-pill { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; }
.status-pill.active { background: var(--success-soft); color: var(--success); }
.status-pill.closed { background: var(--panel-alt); color: var(--ink-faint); }
.status-pill.highlighted { background: var(--accent-soft); color: var(--accent-dark); }
.status-pill.wants-highlight { background: #FFF4E0; color: #B8730A; }

.login-shell { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--panel); }
.login-card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 38px; width: 100%; max-width: 380px; }
.login-card .logo { justify-content: center; margin-bottom: 24px; }
.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 16px; }
.alert-error { background: #FDECEC; color: #C53030; }
.alert-success { background: var(--success-soft); color: var(--success); }

.form-row label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 14.5px; margin-bottom: 16px; background: var(--paper);
}
.form-row textarea { resize: vertical; min-height: 100px; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--ink); }
.help-text { font-size: 12px; color: var(--ink-faint); margin-top: -12px; margin-bottom: 16px; }

/* ----- Rich text editor (job description / requirements) ----- */
.quill-editor { border: 1.5px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 16px; overflow: hidden; background: var(--paper); }
.quill-editor .ql-toolbar.ql-snow { border: none; border-bottom: 1px solid var(--border); background: var(--panel); }
.quill-editor .ql-container.ql-snow { border: none; }
.quill-editor .ql-editor { min-height: 140px; font-family: var(--font-body); font-size: 14.5px; color: var(--ink); }
.quill-editor .ql-editor.ql-blank::before { color: var(--ink-faint); font-style: normal; }

/* ----- Contact status pills (applicant tracking) ----- */
.status-pill.not_contacted { background: var(--panel-alt); color: var(--ink-faint); }
.status-pill.contacted { background: #E6F0FF; color: #2A5DBE; }
.status-pill.converted { background: var(--success-soft); color: var(--success); }
.status-pill.lost { background: #FDECEC; color: #C53030; }
.status-pill.not_interested { background: var(--panel-alt); color: var(--ink-faint); }
.status-select {
  font-size: 12.5px; font-weight: 700; padding: 5px 8px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--paper); font-family: var(--font-body);
}

/* ----- Pre-payment confirmation modal ----- */
.modal-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(17,22,43,0.55);
  align-items: center; justify-content: center; padding: 20px; z-index: 100;
}
.modal-backdrop.show { display: flex; }
.modal-card {
  background: var(--paper); border-radius: var(--radius-lg); padding: 28px; max-width: 380px; width: 100%;
  box-shadow: var(--shadow-lg);
}
.modal-card h3 { font-family: var(--font-display); font-size: 19px; margin: 0 0 10px; }
.modal-card p { color: var(--ink-soft); font-size: 14px; margin: 0 0 18px; }
.modal-price-row { display: flex; align-items: baseline; justify-content: space-between; background: var(--panel); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 20px; }
.modal-price-row .label { font-size: 13.5px; color: var(--ink-soft); }
.modal-price-row .price { font-family: var(--font-mono); font-size: 22px; font-weight: 700; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .job-detail-grid { grid-template-columns: 1fr; }
  .apply-panel { position: static; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; display: flex; align-items: center; overflow-x: auto; padding: 14px 0; }
  .admin-sidebar .logo { padding: 0 16px; }
  .admin-main { padding: 24px 18px; }
}
@media (max-width: 600px) {
  .job-card { flex-direction: column; }
  .job-card-right { text-align: left; width: 100%; }
  .mini-stats { justify-content: flex-start; }
}
