:root {
  --deep-forest: #0B1C16;
  --forest-green: #0B3D2E;
  --emerald: #1A5E3A;
  --copper: #B97333;
  --ivory: #F5F1E8;
  --light-copper: #E3AC6B;
  --dark-copper: #9B5C29;
  --sage: #A8C5A0;
  --cream: #FDFAF4;
  --charcoal: #2C2C2A;
  --copper-tint: #F7EBD8;
  --font-heading: 'Trebuchet MS', 'Trebuchet', sans-serif;
  --font-body: Calibri, 'Trebuchet MS', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 14px;
}

h1, h2, h3, h4, .heading { font-family: var(--font-heading); color: var(--forest-green); font-weight: bold; }

a { color: var(--forest-green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Top nav */
.topnav {
  background: var(--forest-green);
  color: var(--cream);
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 56px;
  gap: 24px;
}
.topnav .brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: bold; font-size: 17px; color: var(--cream); }
.topnav .brand img { height: 30px; }
.topnav nav { display: flex; gap: 4px; flex: 1; }
.topnav nav a {
  color: var(--cream); opacity: .85; padding: 8px 12px; border-radius: 4px; font-family: var(--font-heading);
}
.topnav nav a.active, .topnav nav a:hover { opacity: 1; background: rgba(255,255,255,.12); text-decoration: none; }
.topnav .userchip {
  background: var(--copper); color: white; border-radius: 50%; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold;
}
.topnav .right { display: flex; align-items: center; gap: 14px; }
.tagline-bar { background: var(--deep-forest); color: var(--light-copper); font-size: 11px; padding: 4px 20px; letter-spacing: .04em; }

/* Layout */
.wrap { max-width: 1280px; margin: 0 auto; padding: 24px 20px 60px; }
.page-title { font-size: 26px; margin: 0 0 4px; }
.page-sub { color: #5F5E5A; margin: 0 0 20px; font-size: 13.5px; }

/* Cards / buttons */
.card { background: var(--cream); border: 1px solid #e4ddcc; border-radius: 8px; padding: 18px; margin-bottom: 16px; }
.btn {
  display: inline-block; font-family: var(--font-heading); font-weight: bold; font-size: 13px;
  padding: 8px 16px; border-radius: 5px; border: 1px solid var(--forest-green); background: var(--forest-green);
  color: white; cursor: pointer;
}
.btn:hover { background: var(--emerald); text-decoration: none; }
.btn.secondary { background: var(--cream); color: var(--forest-green); }
.btn.secondary:hover { background: var(--copper-tint); }
.btn.copper { background: var(--copper); border-color: var(--copper); }
.btn.copper:hover { background: var(--dark-copper); }
.btn.danger { background: var(--cream); border-color: #b23b3b; color: #b23b3b; }
.btn.danger:hover { background: #fbeaea; }
.btn.small { padding: 4px 10px; font-size: 11.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

input, select, textarea {
  font-family: var(--font-body); font-size: 13.5px; padding: 7px 9px; border: 1px solid #cfc7b3;
  border-radius: 5px; background: white; color: var(--charcoal);
}
textarea { width: 100%; font-family: var(--font-body); }
label { font-size: 12px; color: #5F5E5A; display: block; margin-bottom: 3px; font-family: var(--font-heading); }
.field { margin-bottom: 12px; }

table { border-collapse: collapse; width: 100%; }
th { background: var(--forest-green); color: white; text-align: left; padding: 8px 10px; font-family: var(--font-heading); font-size: 12px; }
td { padding: 8px 10px; border-bottom: 1px solid #ece5d4; vertical-align: top; font-size: 13px; }
tr:nth-child(even) td { background: var(--copper-tint); }

.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: bold; font-family: var(--font-heading); }
.pill.sled { background: var(--sage); color: var(--deep-forest); }
.pill.commercial { background: var(--light-copper); color: var(--deep-forest); }
.pill.healthcare { background: #cbd9f2; color: #12305c; }
.pill.overdue { background: #f3d3d3; color: #7a1f1f; }
.pill.warn { background: var(--light-copper); color: var(--deep-forest); }
.pill.ok { background: var(--sage); color: var(--deep-forest); }
.pill.neutral { background: #e6e1d3; color: var(--charcoal); }
.pill.red { background: var(--copper); color: white; }
.pill.yellow { background: var(--light-copper); color: var(--deep-forest); }
.pill.green { background: var(--sage); color: var(--deep-forest); }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 13.5px; }
.flash.success { background: var(--sage); color: var(--deep-forest); }
.flash.error { background: #f3d3d3; color: #7a1f1f; }

/* Pursuit shell */
.pursuit-header { background: var(--cream); border: 1px solid #e4ddcc; border-radius: 8px; padding: 18px 22px; margin-bottom: 16px; }
.pursuit-header .top-row { display: flex; justify-content: space-between; align-items: flex-start; }
.pursuit-header h1 { margin: 0; font-size: 22px; }
.pursuit-header .sub { color: #5F5E5A; font-size: 13px; margin-top: 2px; }
.kpi-row { display: flex; gap: 14px; margin-top: 16px; }
.kpi { flex: 1; background: white; border: 1px solid #eee3cf; border-radius: 6px; padding: 10px 14px; }
.kpi .label { font-size: 11px; color: #5F5E5A; font-family: var(--font-heading); }
.kpi .value { font-size: 20px; font-weight: bold; color: var(--forest-green); font-family: var(--font-heading); }

.pursuit-body { display: flex; gap: 20px; }
.pursuit-sidebar { width: 190px; flex-shrink: 0; }
.pursuit-sidebar a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 5px; color: var(--charcoal); font-size: 13.5px; margin-bottom: 2px; }
.pursuit-sidebar a.active { background: var(--forest-green); color: white; font-weight: bold; }
.pursuit-sidebar a:hover:not(.active) { background: var(--copper-tint); text-decoration: none; }
.pursuit-sidebar .check { color: var(--emerald); }
.pursuit-main { flex: 1; min-width: 0; }

.section-banner { background: var(--forest-green); color: white; font-family: var(--font-heading); font-weight: bold; padding: 8px 16px; border-radius: 4px; display: inline-block; margin-bottom: 14px; }

.stat-box { text-align: center; }
.big-number { font-size: 46px; font-weight: bold; color: var(--forest-green); font-family: var(--font-heading); }

.rec-badge { text-align: center; padding: 30px 10px; border-radius: 8px; color: white; }
.rec-badge.bid { background: var(--emerald); }
.rec-badge.conditional { background: var(--copper); }
.rec-badge.no-bid { background: #7a2b2b; }
.rec-badge h2 { color: white; margin: 6px 0; font-size: 26px; }
.rec-badge .score { font-size: 40px; font-weight: bold; }

.progress-bar { background: #e6e1d3; border-radius: 4px; height: 8px; overflow: hidden; }
.progress-bar .fill { background: var(--forest-green); height: 100%; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid #e4ddcc; margin-bottom: 16px; }
.tabs a { padding: 8px 14px; font-family: var(--font-heading); font-size: 13px; color: var(--charcoal); border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--forest-green); border-bottom-color: var(--copper); font-weight: bold; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.muted { color: #5F5E5A; font-size: 12.5px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mb8 { margin-bottom: 8px; }
hr.sep { border: none; border-top: 1px solid #e4ddcc; margin: 18px 0; }

.dropzone {
  border: 2px dashed var(--forest-green); border-radius: 8px; padding: 30px; text-align: center; background: white;
}
.callout { background: var(--copper-tint); border-left: 4px solid var(--copper); padding: 10px 14px; border-radius: 4px; font-size: 13px; }
.markdown-view { white-space: pre-wrap; line-height: 1.5; }
.badge-ok, .badge-danger { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: bold; color: white; }
.badge-ok { background: var(--emerald); }
.badge-danger { background: #b23b3b; }
