/* =============================================================================
   Jardin Group, LLC — Opportunity Pipeline & Teaming Portal
   Brand system. Palette sampled from the Jardin logo (indigo bar #241F63 +
   garden-green script #8CC63F) and fonts from jardingrp.com (Lora + Karla).
   Built for Jardin by House Strategies Group / GovCert.ai.
   ============================================================================ */
@import url("https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Karla:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap");

:root {
  /* Brand — from the Jardin logo */
  --indigo: #241F63;          /* logo bar */
  --indigo-deep: #18134A;
  --indigo-hover: #322B7E;
  --indigo-soft: #ECEAF5;
  --green: #8CC63F;           /* logo script */
  --green-bright: #9BD64A;
  --green-deep: #5E8A2E;      /* green text on light (AA) */
  --green-soft: #EEF6DE;

  /* Surfaces — warm paper */
  --bg: #F4F2E9;
  --surface: #FFFFFF;
  --surface-subtle: #FBFAF3;
  --surface-hover: #F8F7EF;
  --border: #E7E2D2;
  --border-strong: #D7D0BC;

  /* Text */
  --ink: #23262B;
  --muted: #6B7180;
  --dim: #9AA0AC;
  --inverse: #FFFFFF;

  /* Tiers / semantic */
  --go: #2F7D32;            --go-bg: #E4F3DF;
  --watch: #9A6B00;        --watch-bg: #FBEFCF;
  --pass: #6B7280;         --pass-bg: #EFF0F2;
  --danger: #B3261E;       --danger-bg: #FBE6E4;
  --info: var(--indigo);   --info-bg: var(--indigo-soft);

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(36,31,99,.06);
  --shadow: 0 1px 2px rgba(36,31,99,.06), 0 6px 16px -8px rgba(36,31,99,.16);
  --shadow-md: 0 2px 6px rgba(36,31,99,.07), 0 16px 32px -14px rgba(36,31,99,.26);
  --shadow-lg: 0 8px 40px -12px rgba(36,31,99,.34);
  --radius-sm: 8px;
  --radius: 13px;
  --radius-lg: 20px;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "DM Mono", "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 14.5px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
/* Soft botanical canvas */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(820px 480px at 8% -6%, rgba(140,198,63,.12), transparent 60%),
    radial-gradient(960px 560px at 100% -8%, rgba(36,31,99,.10), transparent 55%),
    radial-gradient(700px 700px at 50% 118%, rgba(36,31,99,.06), transparent 60%),
    var(--bg);
}
h1,h2,h3,h4,h5 { font-family: var(--serif); color: var(--indigo); margin: 0; line-height: 1.15; letter-spacing: -.01em; }
a { color: var(--indigo); text-decoration: none; transition: color .12s; }
a:hover { color: var(--green-deep); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }
::selection { background: rgba(140,198,63,.34); color: var(--indigo-deep); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #CDC8B6; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); background-clip: content-box; }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); }

/* ---- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 13.5px; font-weight: 700; font-family: var(--sans);
  transition: transform .12s, box-shadow .16s, background .14s, border-color .14s, color .14s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(165deg, var(--indigo-hover), var(--indigo) 60%, var(--indigo-deep)); color: #fff; box-shadow: 0 2px 8px -1px rgba(36,31,99,.34); }
.btn-primary:hover { box-shadow: 0 10px 24px -8px rgba(36,31,99,.5); }
.btn-green { background: linear-gradient(165deg, var(--green-bright), var(--green) 55%, var(--green-deep)); color: #15300a; box-shadow: 0 2px 10px -2px rgba(140,198,63,.6); }
.btn-green:hover { box-shadow: 0 12px 26px -8px rgba(140,198,63,.7); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-subtle); border-color: var(--green); color: var(--indigo); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-subtle); color: var(--ink); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-block { width: 100%; }

/* ---- Cards & badges -------------------------------------------------------- */
.card {
  position: relative; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2.5px 9px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .5px; border-radius: 999px;
  text-transform: uppercase; line-height: 1.5; font-family: var(--sans);
}
.badge-go { background: var(--go-bg); color: var(--go); box-shadow: inset 0 0 0 1px rgba(47,125,50,.25); }
.badge-watch { background: var(--watch-bg); color: var(--watch); box-shadow: inset 0 0 0 1px rgba(154,107,0,.25); }
.badge-pass { background: var(--pass-bg); color: var(--pass); }
.badge-set { background: var(--indigo-soft); color: var(--indigo); }
.badge-green { background: var(--green-soft); color: var(--green-deep); }
.badge-muted { background: var(--surface-subtle); color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }
.badge-urgent { background: var(--danger-bg); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(179,38,30,.22); }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  font-size: 12px; font-weight: 600; border-radius: 999px;
  background: var(--surface-subtle); color: var(--muted); border: 1px solid var(--border);
}
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }

/* =============================================================================
   App shell
   ============================================================================ */
.app { display: grid; grid-template-columns: 254px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; background: var(--surface);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  padding: 18px 14px; gap: 6px;
}
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.sb-brand img { height: 42px; width: auto; }
.sb-brand .bn { font-family: var(--serif); font-weight: 700; font-size: 16px; color: var(--indigo); line-height: 1.05; }
.sb-brand .bt { font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--green-deep); font-weight: 700; }
.sb-nav { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.sb-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 600; font-size: 14px; transition: background .12s, color .12s;
}
.sb-link:hover { background: var(--surface-subtle); color: var(--indigo); }
.sb-link.active { background: var(--indigo); color: #fff; }
.sb-link.active .ico { color: var(--green-bright); }
.sb-link .ico { width: 18px; height: 18px; display: inline-flex; color: var(--green-deep); }
.sb-link.active .ico svg, .sb-link .ico svg { width: 18px; height: 18px; }
.sb-foot { margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--dim); }
.sb-foot .by { color: var(--muted); font-weight: 600; }
.sb-foot .by b { color: var(--indigo); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  border-bottom: 1px solid var(--border); padding: 14px 30px;
  display: flex; align-items: center; gap: 18px;
}
.topbar h1 { font-size: 21px; }
.topbar .sub { color: var(--muted); font-size: 13px; margin-top: 1px; }
.topbar .spacer { flex: 1; }
.content { padding: 26px 30px 60px; max-width: 1180px; width: 100%; }

/* ---- Stat strip ------------------------------------------------------------ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -18px; top: -18px; width: 70px; height: 70px; border-radius: 50%; background: var(--green-soft); opacity: .6; }
.stat .k { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.stat .v { font-family: var(--serif); font-size: 34px; font-weight: 700; color: var(--indigo); line-height: 1.1; margin-top: 4px; position: relative; }
.stat .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.go .v { color: var(--go); } .stat.go::after { background: var(--go-bg); }
.stat.watch .v { color: var(--watch); } .stat.watch::after { background: var(--watch-bg); }

/* ---- Filter bar ------------------------------------------------------------ */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px; box-shadow: var(--shadow-sm); }
.seg button { border: none; background: transparent; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--indigo); color: #fff; }
.seg button.on.go { background: var(--go); } .seg button.on.watch { background: var(--watch); } .seg button.on.pass { background: var(--pass); }
.search { flex: 1; min-width: 200px; }
.search input { width: 100%; padding: 9px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.search input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(140,198,63,.2); }

/* ---- Opportunity rows ------------------------------------------------------ */
.opp-list { display: flex; flex-direction: column; gap: 12px; }
.opp {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.opp:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.opp:hover .opp-title { color: var(--green-deep); }
.score-ring { width: 56px; height: 56px; display: grid; place-items: center; position: relative; }
.score-ring .num { font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--indigo); }
.opp-body { min-width: 0; }
.opp-title { font-family: var(--serif); font-weight: 600; font-size: 17px; color: var(--indigo); transition: color .14s; }
.opp-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 7px; font-size: 12.5px; color: var(--muted); }
.opp-meta b { color: var(--ink); font-weight: 600; }
.opp-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.opp-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 120px; }
.opp-due { font-size: 12px; color: var(--muted); text-align: right; }
.opp-due b { display: block; font-family: var(--mono); font-size: 13px; color: var(--ink); }
.opp-val { font-family: var(--mono); font-size: 12.5px; color: var(--green-deep); font-weight: 500; }

/* ---- Detail ---------------------------------------------------------------- */
.detail-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 6px; }
.detail-head .num { width: 62px; height: 62px; border-radius: 14px; display: grid; place-items: center; background: var(--indigo); color: #fff; font-family: var(--serif); font-weight: 700; font-size: 22px; box-shadow: var(--shadow); }
.detail h2 { font-size: 26px; line-height: 1.15; }
.detail .dmeta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0 6px; font-size: 13px; color: var(--muted); }
.detail .dmeta b { color: var(--ink); }
.grid2 { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
@media (max-width: 900px){ .grid2 { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.panel h3 { font-size: 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.panel h3 .ico { color: var(--green-deep); display: inline-flex; }
.panel p { margin: 0 0 10px; }
.kv { display: flex; flex-direction: column; gap: 11px; }
.kv .row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.kv .row:last-child { border-bottom: none; padding-bottom: 0; }
.kv .row .k { color: var(--muted); }
.kv .row .v { font-weight: 600; color: var(--ink); text-align: right; }
.themes { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.themes li { position: relative; padding-left: 22px; font-size: 13.5px; }
.themes li::before { content: ""; position: absolute; left: 0; top: 7px; width: 9px; height: 9px; border-radius: 2px; background: var(--green); transform: rotate(45deg); }
.aibox { background: linear-gradient(165deg, var(--indigo), var(--indigo-deep)); color: #E9E7F4; border-radius: var(--radius); padding: 4px; box-shadow: var(--shadow); }
.aibox .inner { padding: 18px 20px; }
.aibox h3 { color: #fff; }
.aibox .lab { font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--green-bright); font-weight: 700; }
.aibox .rec { font-family: var(--serif); font-size: 22px; font-weight: 700; color: #fff; margin: 4px 0 8px; }
.aibox p { color: #D8D5EC; font-size: 13.5px; }
.rep-note { font-size: 12px; color: var(--muted); background: var(--surface-subtle); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 9px 13px; margin-bottom: 18px; }
.rep-note b { color: var(--indigo); }

/* ---- Partners -------------------------------------------------------------- */
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.partner { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); transition: transform .16s, box-shadow .16s; }
.partner:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.partner .ava { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 18px; color: #fff; }
.partner .ph { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.partner .nm { font-family: var(--serif); font-weight: 700; font-size: 16px; color: var(--indigo); line-height: 1.1; }
.partner .fm { font-size: 12.5px; color: var(--muted); }
.partner .role { margin-left: auto; }
.partner .focus { font-size: 13px; color: var(--ink); margin: 4px 0 12px; }
.partner .pf { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.partner .contact { font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; border-top: 1px solid var(--border); padding-top: 11px; }
.partner .contact a { font-weight: 600; }
.partner.add { border: 1.5px dashed var(--border-strong); display: flex; align-items: center; justify-content: center; min-height: 200px; cursor: pointer; color: var(--muted); flex-direction: column; gap: 8px; background: var(--surface-subtle); }
.partner.add:hover { border-color: var(--green); color: var(--green-deep); background: var(--green-soft); }
.partner.add .plus { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border-strong); font-size: 24px; color: var(--green-deep); }

/* ---- Forms / modal --------------------------------------------------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(140,198,63,.2); }
.modal-bg { position: fixed; inset: 0; background: rgba(24,19,74,.42); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 24px; animation: fade .2s; }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-width: 480px; width: 100%; padding: 26px 28px; max-height: 90vh; overflow: auto; animation: pop .22s cubic-bezier(.22,1,.36,1); }
.modal h2 { font-size: 21px; margin-bottom: 4px; }
.modal .mh { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.modal .mfoot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* =============================================================================
   Login
   ============================================================================ */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
@media (max-width: 880px){ .login-wrap { grid-template-columns: 1fr; } .login-hero { display: none; } }
.login-hero {
  background: linear-gradient(160deg, var(--indigo) 0%, var(--indigo-deep) 70%, #110d38 100%);
  color: #E9E7F4; padding: 54px 56px; display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.login-hero::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(140,198,63,.22), transparent 70%); }
.login-hero .logo { height: 70px; width: auto; align-self: flex-start; }
.hero-lockup { display: flex; align-items: center; gap: 14px; align-self: flex-start; }
.hero-lockup img { height: 66px; width: auto; }
.hero-lockup .hl-name { font-family: var(--serif); font-size: 27px; font-weight: 700; color: #fff; line-height: 1; letter-spacing: .2px; }
.hero-lockup .hl-name span { color: var(--green-bright); }
.hero-lockup .hl-tag { font-size: 10.5px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--green-bright); margin-top: 6px; font-weight: 700; }
.login-hero .he { margin-top: auto; }
.login-hero .eyebrow { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--green-bright); font-weight: 700; }
.login-hero h1 { color: #fff; font-size: 38px; line-height: 1.1; margin: 14px 0 16px; max-width: 12ch; }
.login-hero h1 em { color: var(--green-bright); font-style: italic; }
.login-hero p { color: #CFCCE6; font-size: 15px; max-width: 42ch; line-height: 1.6; }
.login-hero .stats-row { display: flex; gap: 30px; margin-top: 30px; }
.login-hero .sr .n { font-family: var(--serif); font-size: 28px; font-weight: 700; color: #fff; }
.login-hero .sr .l { font-size: 11.5px; color: #B9B5DC; letter-spacing: .3px; }
.login-card { display: grid; place-items: center; padding: 40px 30px; background: var(--bg); }
.login-box { width: 100%; max-width: 380px; }
.login-box .mk { height: 56px; margin: 0 auto 18px; display: block; }
.login-box h2 { font-size: 24px; text-align: center; }
.login-box .ls { text-align: center; color: var(--muted); font-size: 13.5px; margin: 6px 0 26px; }
.login-box .err { background: var(--danger-bg); color: var(--danger); font-size: 13px; padding: 9px 13px; border-radius: var(--radius-sm); margin-bottom: 14px; text-align: center; font-weight: 600; }
.login-box .hint { text-align: center; font-size: 12px; color: var(--dim); margin-top: 18px; }

/* ---- misc ------------------------------------------------------------------ */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .ico { color: var(--border-strong); margin-bottom: 12px; display: inline-flex; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.back:hover { color: var(--indigo); }
.section-label { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--green-deep); font-weight: 700; margin: 4px 0 12px; }
.animate-in { animation: rise .3s cubic-bezier(.22,1,.36,1); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--indigo); color: #fff; padding: 11px 20px; border-radius: 999px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: 13.5px; z-index: 200; animation: pop .2s; }
.toast b { color: var(--green-bright); }
