:root {
  /* JaRco Brand Book 2026 */
  --brand: #136051;        /* Dark Green — primary, headers, strong text */
  --brand-deep: #0e4a3e;
  --forest: #51773f;       /* Forest Green */
  --leaf: #c2d4bb;         /* Light Green — panels, charts */
  --leaf-soft: #e6eee2;
  --cream: #fcf0e6;        /* page background */
  --cream-deep: #f6e6d6;
  --lime: #c0e000;         /* accent — sparingly */
  --sky: #5dc6c9;          /* accent */
  --amber: #ffbf00;        /* accent */
  --ink: #000000;
  --paper: var(--cream);
  --card: #ffffff;
  --line: #e9dccd;
  --muted: #5a5a50;
  --green: var(--brand);
  --red: #b3432b;
  --radius: 12px;
  /* legacy names kept so nothing else breaks */
  --gold: var(--brand);
  --gold-deep: var(--brand-deep);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

/* ---- top bar ---- */
.topbar {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px 28px;
  background: var(--ink);
  color: #fff;
}
.brand { text-decoration: none; display: flex; align-items: baseline; gap: 6px; }
.brand-mark { font-weight: 700; letter-spacing: 0.3px; color: #fff; font-size: 18px; }
.brand-logo { height: 28px; display: block; }
.brand-logo-lg { height: 44px; }
.brand-sub { color: var(--gold); font-size: 14px; font-weight: 600; }
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a {
  color: #dfeae4;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
}
.topnav a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.topnav a.active { color: var(--ink); background: var(--gold); font-weight: 600; }
.topbar-user { display: flex; align-items: center; gap: 14px; font-size: 14px; color: #dfeae4; }
.logout { color: var(--gold); text-decoration: none; }
.logout:hover { text-decoration: underline; }

/* ---- layout ---- */
.page { max-width: 1080px; margin: 0 auto; padding: 28px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } .topnav { display: none; } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.card h2 { margin: 0 0 14px; font-size: 16px; font-weight: 700; }

/* ---- balance card ---- */
.balance-number { font-size: 40px; font-weight: 700; color: var(--ink); }
.balance-number span { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.balance-sub { color: var(--muted); font-size: 13px; margin: 6px 0 18px; }

.stat-list { margin: 0 0 16px; }
.stat-list div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.stat-list dt { color: var(--muted); }
.stat-list dd { margin: 0; font-weight: 600; }

/* ---- buttons ---- */
.btn {
  display: inline-block;
  border: none;
  border-radius: 7px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-deep); }
.btn-primary:disabled { background: var(--leaf); color: #a89f8a; cursor: not-allowed; }
.btn-secondary { background: var(--ink); color: #fff; }
.btn-secondary:hover { background: var(--brand-deep); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-approve { background: var(--green); color: #fff; }
.btn-reject { background: var(--red); color: #fff; }

/* ---- forms ---- */
.form-card { max-width: 560px; }
.form-intro { color: var(--muted); margin-top: -6px; }
.field-row { display: flex; gap: 16px; }
.field { flex: 1; margin-bottom: 16px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
input[type=date], input[type=text], input[type=number], textarea, select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
textarea { resize: vertical; }
.input-narrow { width: 72px; }

.days-preview {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--ink);
}
.days-preview strong { color: var(--gold-deep); }

/* ---- tables ---- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table td { font-size: 13px; }

.decision-form { display: flex; gap: 6px; align-items: center; }
.decision-form input[type=text] { width: 140px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; margin-left: 6px; vertical-align: middle; }
.badge-pending_manager { background: #fff2cc; color: #7a5a00; }
.badge-pending_hr { background: #dcf3f3; color: #1d6466; }
.badge-approved { background: var(--leaf); color: var(--green); }
.badge-rejected { background: #fbe6e1; color: var(--red); }
.badge-closed { background: #eeeae4; color: var(--muted); }

/* job posting status */
.badge-draft { background: #eeeae4; color: var(--muted); }
.badge-pending_approval { background: #fff2cc; color: #7a5a00; }
.badge-published { background: var(--leaf); color: var(--green); }

/* applicant pipeline status */
.badge-status-applied { background: #eeeae4; color: var(--muted); }
.badge-status-screening { background: #dcf3f3; color: #1d6466; }
.badge-status-interview { background: #fff2cc; color: #7a5a00; }
.badge-status-offer { background: #f0e6fb; color: #6b3fa0; }
.badge-status-hired { background: var(--leaf); color: var(--green); }
.badge-status-rejected { background: #fbe6e1; color: var(--red); }

/* ---- pipeline / status tabs ---- */
.pipeline-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.pipeline-tabs a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  border: 1px solid var(--line);
}
.pipeline-tabs a:hover { border-color: var(--gold); }
.pipeline-tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---- form helpers ---- */
.section-heading { font-size: 14px; font-weight: 700; margin: 22px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.field-hint { color: var(--muted); font-size: 12px; margin: -10px 0 14px; }
.checkbox-group { display: flex; flex-direction: column; gap: 6px; }
.checkbox-inline { display: flex; align-items: center; font-weight: 500; text-transform: none; letter-spacing: normal; color: var(--ink); font-size: 14px; }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.question-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
@media (max-width: 760px) { .question-row { grid-template-columns: 1fr; } }

.empty { color: var(--muted); font-size: 14px; }
.link-more { display: inline-block; margin-top: 10px; color: var(--gold-deep); text-decoration: none; font-size: 13px; font-weight: 600; }

/* ---- flash ---- */
.flash-stack { margin-bottom: 18px; }
.flash { padding: 10px 14px; border-radius: 7px; font-size: 14px; margin-bottom: 8px; }
.flash-success { background: var(--leaf); color: var(--green); }
.flash-error { background: #fbe6e1; color: var(--red); }

/* ---- login ---- */
.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; background: var(--ink); }
.login-card { background: #fff; border-radius: 14px; padding: 40px 36px; width: 340px; text-align: center; }
.login-brand { justify-content: center; margin-bottom: 14px; }
.login-brand .brand-mark { color: var(--ink); }
.login-copy { color: var(--muted); font-size: 14px; margin-bottom: 24px; }

/* ======================================================================
   JaRco Procurement additions (same tokens as the other JaRco apps)
   ====================================================================== */
.page { max-width: 1200px; }
.topbar { gap: 20px; flex-wrap: wrap; }
.topnav { flex-wrap: wrap; }
.topnav a { padding: 7px 11px; }
.bell { position: relative; color: #dfeae4; text-decoration: none; display: inline-flex; align-items: center; }
.bell:hover { color: #fff; }
.bell .dot { position: absolute; top: -6px; right: -9px; background: var(--gold); color: var(--ink); border-radius: 10px; font-size: 10px; font-weight: 700; padding: 0 5px; line-height: 16px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 22px; margin: 0; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-danger { background: transparent; color: var(--red); border: 1px solid #f0c9bf; }
.btn-danger:hover { background: #fbe6e1; }
a { color: var(--gold-deep); }
.table a { color: var(--ink); font-weight: 600; text-decoration: none; }
.table a:hover { color: var(--gold-deep); text-decoration: underline; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table th.num { text-align: right; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt0 { margin-top: 0; }
.hide { display: none !important; }
.table-wrap { overflow-x: auto; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi .v { font-size: 26px; font-weight: 700; }
.kpi .v small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.kpi .l { color: var(--muted); font-size: 13px; }

/* task list */
.tasks { list-style: none; padding: 0; margin: 0; }
.tasks li a { display: flex; justify-content: space-between; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.tasks li a:hover { background: #fbf8f0; }
.count-pill { background: var(--gold); color: var(--ink); font-weight: 700; border-radius: 20px; padding: 1px 10px; font-size: 13px; }

/* status badges */
.badge { margin-left: 0; white-space: nowrap; }
.b-grey { background: #eeeae4; color: var(--muted); }
.b-amber { background: #fff2cc; color: #7a5a00; }
.b-blue { background: #dcf3f3; color: #1d6466; }
.b-green { background: var(--leaf); color: var(--green); }
.b-red { background: #fbe6e1; color: var(--red); }
.b-purple { background: #f0e6fb; color: #6b3fa0; }
.b-ink { background: var(--ink); color: #fff; }

/* progress steps */
.steps { display: flex; gap: 0; margin: 4px 0 20px; overflow-x: auto; }
.step { flex: 1; min-width: 88px; text-align: center; position: relative; font-size: 12px; color: var(--muted); padding-top: 26px; }
.step::before { content: ""; position: absolute; top: 8px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: #fff; border: 2px solid var(--line); z-index: 1; }
.step::after { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.step:first-child::after { display: none; }
.step.done { color: var(--ink); }
.step.done::before { background: var(--gold); border-color: var(--gold); }
.step.done::after, .step.current::after { background: var(--gold); }
.step.current { color: var(--ink); font-weight: 700; }
.step.current::before { border-color: var(--gold); box-shadow: 0 0 0 4px #f4e7c6; }

/* definition grid */
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 20px; margin: 0; }
.dl dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.dl dd { margin: 2px 0 0; font-weight: 600; }

/* item editor rows */
.item-row { display: grid; grid-template-columns: 2.4fr 1.6fr .8fr .7fr 1fr .5fr 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.item-row.head { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.item-row .x { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.item-row .x:hover { color: var(--red); }
@media (max-width: 860px) { .item-row { grid-template-columns: 1fr 1fr; } .item-row.head { display: none; } }
.method-box { background: var(--cream); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 14px 0; font-size: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.method-box strong { color: var(--gold-deep); }

/* bid matrix */
.matrix td.lowest { background: var(--leaf); font-weight: 700; }
.matrix td.lowest::after { content: " ✓"; color: var(--green); }
.matrix th { white-space: normal; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--line); position: relative; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.timeline .when { color: var(--muted); font-size: 12px; }

/* inline forms */
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin-bottom: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters input[type=text], .filters select { width: auto; min-width: 180px; }
.box { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 14px; background: var(--leaf-soft); }
.box h3 { margin: 0 0 10px; font-size: 14px; }
details.box summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.stars { color: var(--gold); letter-spacing: 1px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: #f3efe4; border-radius: 14px; padding: 2px 10px; font-size: 12px; color: var(--muted); }
.vendor-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.warn { background: #fff2cc; color: #7a5a00; border-radius: 7px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.login-card { width: 380px; }
.login-card form { text-align: left; margin-top: 18px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 18px 0 4px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media print { .topbar, .actions, form, .no-print { display: none !important; } body { background: #fff; } .card { border: none; } }
input[type=password], input[type=email], input[type=tel] { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; font-size: 14px; font-family: inherit; background: #fff; color: var(--ink); }
input[type=file] { font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #f4e7c6; border-color: var(--gold); }


/* =========================================================================
   JaRco Brand Book 2026 — same look as IT Tickets and HRIS (overrides)
   ========================================================================= */
.topbar { background: var(--brand); color: #fff; padding: 12px 28px; border-bottom: 4px solid var(--forest); }
.brand { align-items: center; gap: 12px; }
.brand-logo { height: 40px; }
.brand-logo-lg { height: 64px; }
.brand-logo-plate { background: transparent; padding: 0; }
.brand-sub { color: #fff; font-size: 14px; font-weight: 700; padding-left: 12px; margin-left: 0; border-left: 1px solid rgba(255,255,255,0.35); line-height: 1.2; }
.topnav a { color: #dfeae4; }
.topnav a:hover { color: #fff; background: rgba(255,255,255,0.10); }
.topnav a.active { color: #fff; background: rgba(255,255,255,0.14); font-weight: 700; box-shadow: inset 0 -3px 0 var(--lime); }
.topbar-user { color: #dfeae4; }
.logout { color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,0.4); padding: 5px 12px; border-radius: 6px; }
.logout:hover { background: rgba(255,255,255,0.12); text-decoration: none; }
.card h2 { color: var(--brand); }
.card > h2:first-child::after { content: ""; display: block; width: 32px; height: 4px; border-radius: 2px; background: var(--lime); margin-top: 8px; }
.balance-number { color: var(--brand); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); color: #fff; }
.btn-primary:disabled { background: var(--leaf); color: #6f7f69; }
.btn-secondary { background: #fff; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.btn-secondary:hover { background: var(--leaf-soft); color: var(--brand); }
.btn-approve { background: var(--forest); color: #fff; }
label { font-weight: 700; color: var(--brand); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(81,119,63,0.18); }
input[type=email], input[type=url], input[type=tel], input[type=password], input[type=search] {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink);
}
.table th { color: var(--brand); background: var(--leaf-soft); }
.flash-success { background: var(--leaf); color: var(--brand); }
.link-more { color: var(--brand); }
.pipeline-tabs a { color: var(--muted); }
.pipeline-tabs a:hover { border-color: var(--forest); }
.pipeline-tabs a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.login-body { min-height: 100vh; height: auto; padding: 16px; background: var(--brand) radial-gradient(circle at 85% 15%, rgba(192,224,0,0.16), transparent 45%); }
.login-card { border-radius: 16px; padding: 40px 36px 32px; width: 100%; max-width: 380px; box-shadow: 0 18px 50px rgba(0,0,0,0.25); }
.login-brand { flex-direction: column; justify-content: center; gap: 10px; }
.login-brand .brand-sub { color: var(--brand); border-left: 0; padding-left: 0; font-size: 15px; }
.login-brand .brand-sub::after { content: ""; display: block; width: 32px; height: 4px; border-radius: 2px; background: var(--lime); margin: 8px auto 0; }
a { color: var(--brand); }
a:hover { color: var(--forest); }
.topnav a, .topnav a:hover, .logout, .btn-primary, .btn-approve, .btn-reject { }
.site-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 8px 16px 28px; }
.site-foot strong { color: var(--brand); }
@media (max-width: 760px) { .topbar { padding: 10px 16px; gap: 12px; flex-wrap: wrap; } .page { padding: 18px 16px; } .brand-logo { height: 32px; } }
/* procurement extras in brand colours */
.bell .dot { background: var(--amber); color: #000; }
.count-pill { background: var(--brand); color: #fff; }
.step.current::before { box-shadow: 0 0 0 4px var(--leaf-soft); }
.method-box strong { color: var(--brand); }
