/* CareMakers CRM — palette per Reference Documentation/CareMakers_Collective_
   Brand_Design_Reference.md (deck palette: slate-teal, cream, teal, coral,
   green, saffron; Poppins headings, Open Sans body; dashed-stitch motif). */
:root {
  --slate: #233849; --cream: #F5F3E9; --teal: #007890; --teal-dark: #00697F;
  --coral: #C67F6E; --coral-fill: #A85B47; --green: #60A830; --green-fill: #457C22;
  --saffron: #F8A020; --ink: #2E3A42; --muted: #646C74; --border: #E6E1D2;
  --card: #FFFFFF;
}
* { box-sizing: border-box; margin: 0; }
body {
  font-family: 'Open Sans', system-ui, sans-serif; background: var(--cream);
  color: var(--ink); font-size: 15px; min-height: 100vh; display: flex;
}
h1, h2, h3, .brand { font-family: 'Poppins', sans-serif; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── sidebar ── */
.sidebar {
  width: 220px; min-height: 100vh; background: var(--slate); color: var(--cream);
  display: flex; flex-direction: column; flex-shrink: 0; position: sticky; top: 0;
  height: 100vh;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px; padding: 18px 16px;
  font-weight: 600; font-size: 15px; line-height: 1.2; color: #fff;
}
.sidebar .brand img { width: 34px; height: 32px; }
.sidebar nav { flex: 1; padding: 8px; }
.sidebar nav a {
  display: block; padding: 10px 12px; margin: 2px 0; border-radius: 8px;
  color: rgba(245,243,233,.85); font-weight: 600; font-size: 14px;
}
.sidebar nav a:hover { background: rgba(245,243,233,.08); text-decoration: none; }
.sidebar nav a.active { background: var(--teal); color: #fff; }
.sidebar .tagline {
  padding: 14px 16px; font-style: italic; font-size: 12.5px; color: var(--coral);
  border-top: 1.5px dashed rgba(198,127,110,.55);
}

/* ── layout ── */
.main { flex: 1; min-width: 0; }
.topbar {
  display: flex; gap: 14px; align-items: center; padding: 12px 24px;
  background: var(--card); border-bottom: 1px solid var(--border);
}
.topbar form.search { flex: 1; max-width: 480px; }
.topbar input[type=search] {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 999px; font: inherit; background: var(--cream);
}
.topbar .who { margin-left: auto; font-size: 13px; color: var(--muted); }
.content { padding: 22px 24px 48px; max-width: 1180px; }
.page-title { font-size: 22px; margin-bottom: 4px; color: var(--slate); }
.page-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }

/* ── cards, grids ── */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; box-shadow: 0 1px 2px rgba(35,56,73,.05);
}
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 950px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }
.kpi .num { font-family: 'Poppins'; font-size: 26px; font-weight: 700; color: var(--slate); }
.kpi .lbl { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi .sub { font-size: 12.5px; color: var(--coral-fill); margin-top: 2px; }
.card h2 { font-size: 15px; color: var(--slate); margin-bottom: 10px; }
.mt { margin-top: 14px; }

/* ── tables ── */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
     color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--border); }
td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:hover td { background: #FBFAF4; }

/* ── badges & pills ── */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px;
         font-weight: 700; white-space: nowrap; }
.badge.funder { background: rgba(0,120,144,.12); color: var(--teal-dark); }
.badge.partner { background: rgba(96,168,48,.15); color: var(--green-fill); }
.badge.volunteer { background: rgba(248,160,32,.18); color: #8a5a0a; }
.badge.board { background: rgba(198,127,110,.18); color: var(--coral-fill); }
.badge.donor { background: rgba(35,56,73,.1); color: var(--slate); }
.badge.plain { background: var(--cream); color: var(--muted); border: 1px solid var(--border); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px;
        font-weight: 600; background: var(--cream); border: 1px solid var(--border);
        color: var(--muted); }
.pill.inprogress { border-color: var(--teal); color: var(--teal-dark); }
.pill.onboarded { border-color: var(--green-fill); color: var(--green-fill); }
.pill.deadend { color: #9a9a92; }
.pill.warn { border-color: var(--saffron); color: #8a5a0a; background: rgba(248,160,32,.1); }
.resp { font-weight: 700; padding: 1px 8px; border-radius: 6px; font-size: 12px; }
.resp.Y { background: rgba(96,168,48,.15); color: var(--green-fill); }
.resp.N { background: rgba(198,127,110,.2); color: var(--coral-fill); }
.resp.q { background: rgba(248,160,32,.15); color: #8a5a0a; }
.resp.none { background: var(--cream); color: var(--muted); }

/* ── buttons & forms ── */
.btn { display: inline-block; padding: 8px 16px; border-radius: 8px; border: 0;
       font: inherit; font-weight: 600; cursor: pointer; font-size: 13.5px; }
.btn.primary { background: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-dark); }
.btn.coral { background: var(--coral-fill); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--ink); }
.btn.sm { padding: 4px 10px; font-size: 12.5px; border-radius: 6px; }
.btn.link { background: none; color: var(--teal); padding: 0; font-weight: 600; }
input, select, textarea {
  font: inherit; padding: 8px 10px; border: 1px solid #d8d2c2; border-radius: 8px;
  background: #fff; width: 100%;
}
textarea { min-height: 74px; resize: vertical; }
label { font-size: 12.5px; font-weight: 700; color: var(--slate); display: block;
        margin: 10px 0 4px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.checks label { display: flex; gap: 6px; align-items: center; font-weight: 400;
                font-size: 13.5px; margin: 0; }
.checks input { width: auto; }

/* ── misc ── */
.fillbar { height: 10px; background: var(--cream); border: 1px solid var(--border);
           border-radius: 999px; overflow: hidden; }
.fillbar > div { height: 100%; background: var(--teal); }
.bar-row { display: grid; grid-template-columns: 160px 1fr 40px; gap: 10px;
           align-items: center; margin: 6px 0; font-size: 13.5px; }
.bar-row .bar { height: 14px; border-radius: 4px; background: var(--teal); min-width: 2px; }
.bar-row:nth-child(even) .bar { background: var(--green); }
.muted { color: var(--muted); font-size: 13px; }
.callout { border-left: 3px solid var(--coral); background: rgba(198,127,110,.07);
           padding: 10px 12px; border-radius: 0 8px 8px 0; font-size: 13.5px; }
.callout.teal { border-color: var(--teal); background: rgba(0,120,144,.06); }
.queue { border: 1.5px dashed var(--coral); border-radius: 10px; padding: 12px 14px;
         background: rgba(198,127,110,.05); }
.timeline { list-style: none; padding-left: 18px; border-left: 2px dashed var(--coral); }
.timeline li { margin: 0 0 14px 10px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -17.5px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--coral); }
.timeline li.auto::before { background: var(--teal); }
.flash { padding: 10px 14px; border-radius: 8px; background: rgba(96,168,48,.12);
         color: var(--green-fill); font-weight: 600; margin-bottom: 14px; }
.login-wrap { margin: auto; width: 340px; }
.login-wrap .card { padding: 26px; }
.login-logo { text-align: center; margin-bottom: 14px; }
.login-logo img { width: 64px; }
.error { color: #B5432E; font-size: 13.5px; margin-top: 8px; }
.two-col { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
@media (max-width: 950px) { .two-col { grid-template-columns: 1fr; } }
