:root {
  --ink:      #172026;
  --paper:    #F3F6F7;
  --card:     #FFFFFF;
  --line:     #DCE4E8;
  --marine:   #0E6BA8;   /* actions */
  --marine-d: #0A5286;
  --moss:     #2E7D5B;   /* money, success */
  --alert:    #B3423A;
  --mute:     #5C6B73;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.55 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--marine); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.7rem; margin: 0 0 .4rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 1.8rem 0 .7rem; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1.2rem; background: var(--ink); color: #fff;
}
.topbar a { color: #D7E3EA; margin-left: 1rem; }
.topbar .brand { font-weight: 700; font-size: 1.15rem; color: #fff; margin: 0; letter-spacing: .02em; }
.topbar .who { color: #8FA6B3; margin-left: 1rem; }
.topbar .btn-sm { background: var(--marine); color: #fff; }

.wrap { max-width: 880px; margin: 0 auto; padding: 1.2rem 1rem 3rem; }

.hero { padding: 2.2rem 0 1.4rem; }
.hero h1 { font-size: 2.1rem; }
.hero p { color: var(--mute); max-width: 46ch; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 1.1rem 1.2rem; margin: .8rem 0;
}
.card.inner { background: var(--paper); }
.card.narrow { max-width: 460px; margin: 2rem auto; }

.project-list { display: flex; flex-direction: column; gap: .5rem; }
.project-row {
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: .9rem 1.1rem; color: inherit;
}
.project-row:hover { border-color: var(--marine); text-decoration: none; }
.project-row p { margin: .2rem 0; }

.budget { color: var(--moss); font-weight: 700; text-align: right; white-space: nowrap; }
.budget .meta { display: block; font-weight: 400; }
.budget.big { font-size: 1.4rem; }

.meta { color: var(--mute); font-size: .85rem; }
.muted { color: var(--mute); }
.clamp { overflow: hidden; }

.pill {
  display: inline-block; padding: .05rem .55rem; border-radius: 99px;
  font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}
.pill-open        { background: #E3EEF6; color: var(--marine-d); }
.pill-in_progress { background: #FCF3DC; color: #8A6A1B; }
.pill-completed, .pill-approved { background: #E4F1EA; color: var(--moss); }
.pill-cancelled   { background: #F6E4E2; color: var(--alert); }
.pill-pending     { background: #ECEFF1; color: var(--mute); }
.pill-funded      { background: #E3EEF6; color: var(--marine-d); }
.pill-delivered   { background: #FCF3DC; color: #8A6A1B; }

.project-head { display: flex; justify-content: space-between; gap: 1rem; align-items: start; margin-top: 1rem; }

.steps { list-style: none; counter-reset: s; padding: 0; display: flex; gap: 1.2rem; flex-wrap: wrap; margin: .8rem 0 1rem; }
.steps li { counter-increment: s; color: var(--mute); font-size: .9rem; }
.steps li::before {
  content: counter(s); display: inline-block; width: 1.5rem; height: 1.5rem;
  border-radius: 50%; text-align: center; line-height: 1.5rem; margin-right: .4rem;
  background: var(--line); color: var(--ink); font-weight: 700; font-size: .8rem;
}
.steps li.done { color: var(--moss); }
.steps li.done::before { background: var(--moss); color: #fff; content: "✓"; }
.steps li.now { color: var(--ink); font-weight: 600; }
.steps li.now::before { background: var(--marine); color: #fff; }

form label { display: block; margin: .8rem 0 .3rem; font-weight: 600; font-size: .9rem; }
input, textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; background: #fff;
}
input:focus, textarea:focus { outline: 2px solid var(--marine); outline-offset: 1px; border-color: var(--marine); }
button, .btn {
  display: inline-block; margin-top: .9rem; padding: .6rem 1.3rem;
  background: var(--marine); color: #fff; border: 0; border-radius: 8px;
  font: inherit; font-weight: 600; cursor: pointer;
}
button:hover, .btn:hover { background: var(--marine-d); text-decoration: none; }
.btn-sm { padding: .3rem .8rem; border-radius: 7px; font-size: .85rem; margin-top: .4rem; }

.error { background: #F6E4E2; color: var(--alert); padding: .6rem .8rem; border-radius: 8px; }
.ok    { background: #E4F1EA; color: var(--moss);  padding: .6rem .8rem; border-radius: 8px; }

.bid.accepted { border-color: var(--moss); }
.bid-head { display: flex; justify-content: space-between; }

.dash-top { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.balance-card .balance { display: block; font-size: 2rem; font-weight: 700; color: var(--moss); }
.inline-form { display: flex; gap: .5rem; align-items: center; margin: .4rem 0; }
.inline-form input { margin: 0; }
.inline-form button { margin: 0; }

.foot {
  display: flex; justify-content: space-between; max-width: 880px;
  margin: 0 auto; padding: 1.2rem 1rem 2rem; color: var(--mute); font-size: .85rem;
}
.foot a { color: var(--mute); }

@media (max-width: 640px) {
  .dash-top { grid-template-columns: 1fr; }
  .project-head { flex-direction: column; }
  .topbar { flex-direction: column; gap: .5rem; }
}

/* === Category system (append to assets/style.css) === */
.cat-bar { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0 1.4rem; }
.cat-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .35rem .8rem; border-radius: 99px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink); font-size: .88rem;
}
.cat-chip:hover { border-color: var(--marine); text-decoration: none; }
.cat-chip.active { background: var(--marine); border-color: var(--marine); color: #fff; }
.cat-chip .cnt {
  background: rgba(0,0,0,.12); border-radius: 99px;
  padding: 0 .45rem; font-size: .75rem;
}
.cat-chip.active .cnt { background: rgba(255,255,255,.25); }
.cat-tag { color: var(--marine-d); font-weight: 600; }
select {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; background: #fff;
}
select:focus { outline: 2px solid var(--marine); outline-offset: 1px; border-color: var(--marine); }
