/* BuildGuard - application stylesheet v2.0
   Restores the marketing landing + app-shell-with-sidebar aesthetic. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --ink:        #0b1220;
  --ink-soft:   #475569;
  --muted:      #64748b;
  --line:       #e2e8f0;
  --line-soft:  #eef2f7;
  --bg:         #f7f9fc;
  --card:       #ffffff;
  --brand:      #155eef;
  --brand-2:    #11b7a6;
  --brand-dark: #0f44c7;
  --sidebar-bg: #07111f;
  --sidebar-bg-2: #0b1a30;
  --warn:       #f59e0b;
  --bad:        #dc2626;
  --good:       #16a34a;
  --shadow-md:  0 12px 35px rgba(15,23,42,.07);
  --shadow-lg:  0 24px 60px rgba(15,23,42,.12);
  --shadow-sm:  0 6px 16px rgba(15,23,42,.05);
  --radius-sm:  14px;
  --radius:     20px;
  --radius-lg:  26px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.muted { color: var(--muted); }
.right { text-align: right; }

h1, h2, h3 {
  font-family: inherit; color: var(--ink); margin: 0 0 12px;
  letter-spacing: -0.025em;
}
h1 { font-size: 42px; font-weight: 900; line-height: 1.05; letter-spacing: -0.035em; }
h2 { font-size: 28px; font-weight: 800; margin-top: 0; }
h3 { font-size: 17px; font-weight: 800; margin-top: 0; }
p { margin: 0 0 12px; color: var(--ink-soft); }

/* ============================================================
   MARKETING / PUBLIC HOMEPAGE
   ============================================================ */

.home-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
}
.home-nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 74px;
}
.brand {
  display: inline-flex; gap: 12px; align-items: center;
  font-weight: 900; font-size: 22px; color: var(--ink);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand-mark {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 14px 35px rgba(21, 94, 239, 0.28);
  position: relative;
  flex: 0 0 38px;
}
.brand-mark::after {
  content: '✓'; font-size: 18px; font-weight: 900; color: #fff;
  position: relative; z-index: 1;
}
.home-nav__links { display: flex; gap: 16px; align-items: center; }
.home-nav__links a { color: var(--ink-soft); font-weight: 600; padding: 8px 4px; }
.home-nav__links a:hover { color: var(--ink); }
.home-nav__links .btn { padding: 9px 16px; }
.home-nav-toggle { display: none; }

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(21,94,239,.17), transparent 30%),
    radial-gradient(circle at 84% 14%, rgba(17,183,166,.22), transparent 30%),
    linear-gradient(180deg, #fff, #f8fbff);
  border-bottom: 1px solid var(--line);
}
.hero__grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 48px; align-items: center;
  padding: 82px 0;
}
.hero h1 {
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.055em;
  margin: 22px 0 18px;
}
.hero p {
  font-size: 19px; line-height: 1.55; color: #475569;
  max-width: 620px;
}
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid #c7d7fe;
  background: #eef4ff; color: #174ea6;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800; font-size: 13px;
}
.trustbar {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 32px;
}
.trustbar > div {
  background: #fff; border: 1px solid var(--line);
  border-radius: 18px; padding: 16px;
  box-shadow: 0 10px 30px rgba(15,23,42,.06);
}
.trustbar strong { display: block; font-size: 22px; font-weight: 900; }
.trustbar span { font-size: 13px; }

/* The mocked product card on the homepage hero right */
.product-card {
  background: linear-gradient(180deg, #07101f, #0b1a30);
  border-radius: 34px;
  padding: 22px;
  color: #fff;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.product-card::before {
  content: ''; position: absolute;
  inset: -90px -100px auto auto;
  width: 250px; height: 250px;
  background: rgba(17, 183, 166, 0.28);
  filter: blur(4px); border-radius: 50%;
}
.product-card__top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; position: relative;
}
.product-card .pill {
  background: rgba(255, 255, 255, 0.12); color: #fff;
  border-color: transparent;
}
.flow-card {
  background: #fff; color: var(--ink);
  border-radius: 22px; padding: 18px; margin: 12px 0;
  position: relative;
}
.flow-card small {
  color: var(--muted); font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.flow-card h3 { margin: 6px 0 0; font-size: 16px; }
.flow-card p { margin: 8px 0 0; font-size: 13px; }
.meter {
  height: 9px; background: #e5e7eb;
  border-radius: 999px; margin-top: 14px; overflow: hidden;
}
.meter span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 999px;
}

.section { padding: 76px 0; }
.section.section--alt { background: #fff; border-top: 1px solid var(--line); }
.section h2 { font-size: 38px; letter-spacing: -0.04em; margin-bottom: 14px; }
.section p.lead {
  font-size: 18px; line-height: 1.55;
  color: var(--ink-soft); max-width: 760px;
}
.steps-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 30px;
}
.step {
  background: #fff; border: 1px solid var(--line);
  border-radius: 22px; padding: 22px;
  box-shadow: var(--shadow-sm);
}
.step b {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 12px;
  background: #eef4ff; color: var(--brand);
  font-size: 15px; font-weight: 900;
  margin-bottom: 12px;
}
.step h3 { font-size: 17px; margin: 0 0 6px; }
.step p { font-size: 14px; margin: 0; }

.grid-3 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px;
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-md);
  margin: 0;
}
.card h3 { margin: 0 0 8px; }
.card p { margin: 0; color: var(--ink-soft); }

.home-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0; background: #fff;
  color: var(--muted);
}
.home-footer p { margin: 0; color: var(--muted); }

/* ============================================================
   APP SHELL (logged-in views)
   ============================================================ */

.app-body { background: var(--bg); }
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2));
  color: #cbd5e1;
  padding: 24px 18px 22px;
  position: sticky; top: 0; align-self: start;
  height: 100vh;
  display: flex; flex-direction: column;
}
.sidebar__brand {
  color: #fff;
  margin-bottom: 8px;
}
.sidebar__brand .brand-mark { box-shadow: 0 14px 35px rgba(17,183,166,.35); }
.sidebar__tag {
  color: #93a4bd; font-size: 12px;
  margin: 0 0 22px 0;
  padding-left: 4px;
}
.sidebar__nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar__link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  font-weight: 600; font-size: 14px;
  text-decoration: none;
  transition: background 120ms, color 120ms;
}
.sidebar__link:hover {
  background: rgba(255, 255, 255, 0.08); color: #fff;
}
.sidebar__link .ico {
  font-size: 14px; opacity: 0.7;
  display: inline-grid; place-items: center;
  width: 22px;
}
.sidebar__foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar__who {
  display: flex; flex-direction: column;
  padding: 10px 12px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  margin-bottom: 10px;
}
.sidebar__who strong { color: #fff; font-weight: 700; font-size: 14px; }
.sidebar__who em {
  font-style: normal; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: #93a4bd; margin-top: 2px;
}
.sidebar__logout {
  display: block; width: 100%;
  padding: 10px 14px;
  background: transparent; color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font: inherit; font-weight: 600; font-size: 13px;
  cursor: pointer;
  transition: background 120ms;
}
.sidebar__logout:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.main { padding: 32px 36px 80px; }
.main__inner { max-width: 1200px; }

/* ============================================================
   DASHBOARD
   ============================================================ */

.dash-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 24px;
}
.dash-head h1 { font-size: 32px; letter-spacing: -0.03em; }
.dash-head p { margin: 6px 0 0; }

.kpis {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
  margin-bottom: 24px;
}
.kpi {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.kpi__label {
  display: block; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted);
}
.kpi__value {
  display: block; font-size: 24px; font-weight: 900;
  letter-spacing: -0.02em; margin-top: 4px;
  color: var(--ink);
}
.kpi small { color: var(--muted); font-size: 12px; }

.workflow-separator {
  display: flex; align-items: center; gap: 14px;
  margin: 30px 0 18px;
  color: var(--muted);
}
.workflow-separator::before, .workflow-separator::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}
.workflow-separator span {
  font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.10em;
}

.panel-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 18px;
}
.panel-card__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 18px;
}
.dash-search {
  width: 280px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px;
  font: inherit; font-size: 14px;
  background: var(--bg); color: var(--ink);
  outline: none;
}
.dash-search:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(21,94,239,.10); }

.dash-table {
  width: 100%; border-collapse: collapse;
}
.dash-table th, .dash-table td {
  text-align: left; padding: 13px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.dash-table th {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: 800;
}
.dash-table tbody tr:hover { background: #f8fbff; }
.dash-table .mini-progress {
  height: 7px; background: var(--line-soft);
  border-radius: 999px; width: 110px; overflow: hidden;
  margin-bottom: 4px;
}
.dash-table .mini-progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 999px;
}

/* ============================================================
   PANELS, FORMS, BUTTONS
   ============================================================ */

.panel {
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  border: 1px solid #c7d7fe;
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.panel.warn { border-left-color: var(--warn); background: linear-gradient(180deg, #fffbeb, #ffffff); border-color: #fde68a; }
.panel.bad  { border-left-color: var(--bad);  background: linear-gradient(180deg, #fef2f2, #ffffff); border-color: #fecaca; }
.panel.good { border-left-color: var(--good); background: linear-gradient(180deg, #f0fdf4, #ffffff); border-color: #bbf7d0; }

.page-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid #c7d7fe;
  background: #eef4ff; color: #174ea6;
  border-radius: 999px; padding: 6px 12px;
  font-weight: 800; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 14px;
  text-decoration: none;
}

label.field { display: block; margin-bottom: 16px; }
label.field > span.lbl {
  display: block; font-weight: 800; font-size: 13px;
  color: var(--ink); margin-bottom: 7px;
}
label.field .help { font-size: 12px; color: var(--muted); margin-top: 6px; display: block; }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=search], textarea, select {
  width: 100%; font: 15px/1.5 inherit; color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.12);
}
textarea { resize: vertical; min-height: 90px; }

.row { display: flex; gap: 16px; }
.row > * { flex: 1; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.checkbox-list {
  border: 1px solid var(--line); background: #fff;
  border-radius: 15px;
  max-height: 240px; overflow-y: auto; padding: 8px 14px;
}
.checkbox-list label {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0; font-size: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.checkbox-list label:last-child { border-bottom: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit;
  font-size: 14px; font-weight: 800;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer; text-decoration: none;
  transition: transform 120ms, box-shadow 120ms, background 120ms;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); color: var(--ink); }
.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-color: transparent; color: #fff;
  box-shadow: 0 14px 30px rgba(21, 94, 239, 0.25);
}
.btn.primary:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-dark), #0a3aa8);
  box-shadow: 0 18px 40px rgba(21, 94, 239, 0.30);
}
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--line-soft); color: var(--ink); }
.btn.danger {
  background: linear-gradient(135deg, var(--bad), #b91c1c);
  border-color: transparent; color: #fff;
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.25);
}
.btn.danger:hover { color: #fff; }
.btn.small { padding: 7px 14px; font-size: 12px; }

.list {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-md);
}
.list th, .list td {
  text-align: left; padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.list thead th {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); background: #f8fafc; font-weight: 800;
}
.list tbody tr:last-child td { border-bottom: 0; }
.list tbody tr:hover { background: #f8fbff; }

.pill {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  background: #e2e8f0; color: var(--ink-soft);
  border: 1px solid transparent;
}
.pill.active   { background: #dbeafe; color: #1e40af; }
.pill.done     { background: #dcfce7; color: #166534; }
.pill.pending  { background: #f1f5f9; color: var(--muted); }
.pill.warn     { background: #fef3c7; color: #92400e; }
.pill.bad      { background: #fee2e2; color: #991b1b; }

.flash {
  border: 1px solid; padding: 13px 18px; margin-bottom: 18px;
  font-size: 14px; font-weight: 600;
  border-radius: 18px;
}
.flash.success { background: #dcfce7; border-color: #86efac; color: #166534; }
.flash.error   { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }

/* Phase tracker on milestone view */
.phase-track {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  margin: 14px 0 28px;
}
.phase-track .ph {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.phase-track .ph .ph-num {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  background: #eef4ff; color: var(--brand);
  font-size: 12px; font-weight: 900;
  border-radius: 10px; margin-right: 8px;
}
.phase-track .ph .ph-name { font-size: 13px; font-weight: 800; color: var(--ink); }
.phase-track .ph .ph-sub { font-size: 11px; color: var(--muted); margin-top: 6px; font-weight: 600; }
.phase-track .ph.completed { background: #f0fdf4; border-color: #bbf7d0; }
.phase-track .ph.completed .ph-num { background: #dcfce7; color: #166534; }
.phase-track .ph.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(21, 94, 239, 0.25);
}
.phase-track .ph.active .ph-num { background: rgba(255,255,255,0.2); color: #fff; }
.phase-track .ph.active .ph-name { color: #fff; }
.phase-track .ph.active .ph-sub { color: rgba(255,255,255,0.85); }

.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
  display: flex; gap: 14px; align-items: center;
  padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.steps .marker {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 10px;
  background: var(--line-soft); color: var(--muted);
  font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.steps li.active .marker {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; box-shadow: 0 8px 20px rgba(21,94,239,.25);
}
.steps li.completed .marker { background: #dcfce7; color: #166534; }
.steps li.active { border-color: #c7d7fe; background: #f8fbff; }
.steps .step-label { flex: 1; font-weight: 700; color: var(--ink); }
.steps .step-actor {
  font-size: 11px; color: var(--muted);
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
}

/* Negotiation timeline */
.timeline { margin-top: 18px; }
.tl-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 16px;
  box-shadow: var(--shadow-md); overflow: hidden;
}
.tl-card .tl-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  border-bottom: 1px solid var(--line);
}
.tl-card .tl-head .v { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; }
.tl-card .tl-head .who { font-size: 13px; color: var(--muted); font-weight: 600; }
.tl-card .tl-body { padding: 18px 22px; }
.tl-card .tl-body dl {
  display: grid; grid-template-columns: 160px 1fr; gap: 8px 18px; margin: 0;
}
.tl-card .tl-body dt {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding-top: 4px; font-weight: 800;
}
.tl-card .tl-body dd { margin: 0; font-size: 14px; color: var(--ink); }
.tl-card .tl-body dd.amount {
  font-size: 22px; font-weight: 900; letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.tl-card .tl-body .note {
  margin-top: 14px; padding: 12px 14px;
  background: #f8fafc; border: 1px solid var(--line-soft);
  border-radius: 14px;
  font-size: 13px; color: var(--ink-soft); font-style: italic;
}
.tl-card.latest { border-color: var(--brand); border-width: 2px; box-shadow: 0 18px 45px rgba(21,94,239,.15); }
.tl-card.final .tl-head { background: linear-gradient(180deg, #f0fdf4, #ffffff); border-bottom-color: #bbf7d0; }
.tl-card.final .v::after {
  content: ' — final'; font-size: 14px;
  background: #dcfce7; color: #166534;
  padding: 3px 10px; margin-left: 8px;
  font-weight: 800; border-radius: 999px;
  letter-spacing: 0; text-transform: none;
}
.tl-card.superseded { opacity: 0.6; }
.tl-card.withdrawn .tl-head .v { text-decoration: line-through; color: var(--muted); }

.delta { font-size: 12px; margin-left: 6px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.delta.up   { color: #92400e; background: #fef3c7; }
.delta.down { color: #166534; background: #dcfce7; }
.delta.same { color: var(--muted); background: var(--line-soft); }
.delta.up::before   { content: '\25B2 '; }
.delta.down::before { content: '\25BC '; }
.delta.same::before { content: '\2014 '; }

.move-banner {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  padding: 22px 28px; margin-bottom: 22px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 20px 50px rgba(21, 94, 239, 0.30);
}
.move-banner .label { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; }
.move-banner .sub { color: rgba(255,255,255,0.85); font-size: 14px; margin-top: 4px; font-weight: 600; }
.move-banner.waiting {
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  color: var(--ink); border: 1px solid #c7d7fe;
  box-shadow: var(--shadow-md);
}
.move-banner.waiting .sub { color: var(--ink-soft); }

.divider {
  display: flex; align-items: center; gap: 14px;
  margin: 30px 0 16px;
  color: var(--muted);
  font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.10em;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.login-shell { max-width: 420px; margin: 80px auto; }
.login-shell h1 { font-size: 34px; margin-bottom: 6px; letter-spacing: -0.035em; }
.login-shell .tag { font-size: 15px; color: var(--ink-soft); margin-bottom: 24px; font-weight: 500; }

.empty {
  border: 2px dashed var(--line); padding: 56px 36px;
  text-align: center; background: var(--card);
  color: var(--muted); border-radius: var(--radius-lg);
}
.empty h2 { color: var(--ink); margin: 0 0 8px; }
.empty p { margin-bottom: 16px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .phase-track { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; padding: 56px 0; gap: 32px; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .trustbar { grid-template-columns: 1fr; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; padding: 18px; }
  .sidebar__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .sidebar__foot { padding-top: 14px; }
  .main { padding: 18px; }
}
@media (max-width: 760px) {
  .home-nav-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line); background: #fff;
    color: var(--ink); border-radius: 999px;
    padding: 9px 14px; font-weight: 800; font-size: 13px;
    cursor: pointer; box-shadow: var(--shadow-sm);
  }
  .home-nav__links {
    display: none; position: absolute;
    right: 16px; top: 70px;
    background: #fff; border: 1px solid var(--line);
    border-radius: 18px; box-shadow: var(--shadow-lg);
    padding: 12px; min-width: 240px;
    flex-direction: column; align-items: stretch;
    z-index: 40;
  }
  .home-nav__links.is-open { display: flex; }
  .home-nav__links a, .home-nav__links .btn {
    width: 100%; justify-content: center;
    padding: 10px 14px;
  }
  .hero h1 { font-size: 36px; }
  .steps-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .dash-head { flex-direction: column; align-items: flex-start; }
  .dash-search { width: 100%; }
  .panel-card__head { flex-direction: column; align-items: stretch; }
  .row, .grid-2 { display: block; }
  .grid-2 > * { margin-bottom: 12px; }
}

/* ============================================================
   ACTION QUEUE + SIDEBAR BADGE  (v2.1)
   ============================================================ */

.action-queue {
  background: linear-gradient(180deg, #fffbeb, #fff);
  border: 1px solid #fde68a;
  border-left: 4px solid var(--warn);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.action-queue__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.action-queue__head h2 { font-size: 18px; font-weight: 800; }
.action-queue__list { list-style: none; margin: 0; padding: 0; }
.action-queue__list li { margin-bottom: 8px; }
.action-queue__list li:last-child { margin-bottom: 0; }
.action-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  background: #fff; border: 1px solid #fde68a;
  border-radius: 14px; padding: 12px 14px;
  text-decoration: none; color: var(--ink);
  transition: border-color 120ms, transform 120ms;
}
.action-item:hover { border-color: var(--warn); transform: translateX(2px); color: var(--ink); }
.action-item__main { flex: 1; min-width: 0; }
.action-item__title { font-size: 14px; font-weight: 600; }
.action-item__sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.action-item__cta { font-size: 12px; font-weight: 800; color: var(--warn); white-space: nowrap; }

.sidebar__badge {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px;
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--warn); color: #fff;
  font-size: 11px; font-weight: 900;
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.35);
}

/* ============================================================
   MESSAGING  (v2.2)
   ============================================================ */

/* Sidebar - blue badge variant for messages */
.sidebar__badge--blue {
  background: var(--brand);
  box-shadow: 0 6px 14px rgba(21, 94, 239, 0.35);
}

/* Inbox list */
.msg-inbox { list-style: none; margin: 0; padding: 0; }
.msg-inbox > li { border-bottom: 1px solid var(--line-soft); }
.msg-inbox > li:last-child { border-bottom: 0; }
.msg-inbox__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  color: var(--ink); text-decoration: none;
  transition: background 120ms;
}
.msg-inbox__row:hover { background: #f8fbff; color: var(--ink); }
.msg-inbox__row.is-unread { background: linear-gradient(90deg, #eef4ff, transparent 80%); }
.msg-inbox__row.is-unread:hover { background: linear-gradient(90deg, #dbeafe, #f8fbff 80%); }
.msg-inbox__main { flex: 1; min-width: 0; }
.msg-inbox__top {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; margin-bottom: 4px;
}
.msg-inbox__top strong { font-weight: 700; }
.msg-inbox__preview {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 13px;
}
.msg-inbox__body {
  color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 580px;
}
.msg-inbox__meta {
  display: flex; align-items: center; gap: 10px;
  white-space: nowrap;
}
.msg-unread {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 900;
  box-shadow: 0 6px 14px rgba(21, 94, 239, 0.35);
}

/* Thread head (in the full-thread view) */
.thread-head { margin-bottom: 18px; }

/* Thread card (full view AND inline panel share this) */
.thread-card { padding: 18px 22px; }
.thread-list {
  display: flex; flex-direction: column; gap: 12px;
  max-height: 480px; overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 16px;
}
.thread-empty { padding: 14px 0; }

.msg { display: flex; }
.msg--mine { justify-content: flex-end; }
.msg__bubble {
  max-width: 70%;
  background: var(--paper-2, #f3efe6);
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 4px;
  padding: 10px 14px;
  background: #f8fafc;
}
.msg--mine .msg__bubble {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  border-color: transparent;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 10px 24px rgba(21, 94, 239, 0.22);
}
.msg__meta {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 11px; margin-bottom: 4px;
  font-weight: 700;
}
.msg--mine .msg__meta { color: rgba(255, 255, 255, 0.92); }
.msg--mine .msg__meta .muted { color: rgba(255, 255, 255, 0.75); }
.msg__body { font-size: 14px; line-height: 1.5; word-wrap: break-word; }

/* Thread reply form (shared by full view + inline panel) */
.thread-form textarea {
  width: 100%; border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit; font-size: 14px;
  background: #fff; color: var(--ink);
  outline: none;
  resize: vertical; min-height: 64px;
}
.thread-form textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.12);
}

@media (max-width: 760px) {
  .msg__bubble { max-width: 90%; }
  .msg-inbox__body { max-width: 200px; }
  .msg-inbox__row { padding: 14px; gap: 10px; }
}

/* ============================================================
   FUND PHASE  (v2.3)
   ============================================================ */

.fund-methods {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin: 14px 0;
}
.fund-method { margin: 0; }
.fund-method__btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  cursor: pointer; font: inherit; color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color 120ms, transform 120ms, box-shadow 120ms;
}
.fund-method__btn:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.fund-method__icon {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 900; font-size: 14px;
  flex-shrink: 0;
}
.fund-method__main { flex: 1; min-width: 0; }
.fund-method__label { display: block; font-weight: 800; font-size: 15px; color: var(--ink); }
.fund-method__desc { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.fund-method__cta { font-size: 12px; font-weight: 800; color: var(--brand); white-space: nowrap; }

.fund-instructions { padding: 0; }
.fund-instructions__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px;
  padding: 18px 22px;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  border-bottom: 1px solid var(--line);
}
.fund-instructions__amount { text-align: right; }
.amount-big {
  font-size: 28px; font-weight: 900;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  margin-top: 2px;
}
.fund-instructions__body { padding: 18px 22px; }

.fund-steps {
  list-style: none; counter-reset: fs; margin: 0; padding: 0;
}
.fund-steps li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.fund-steps li:last-child { border-bottom: 0; }
.fund-steps li::before {
  counter-increment: fs;
  content: counter(fs);
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: #eef4ff; color: var(--brand);
  font-weight: 900; font-size: 12px;
  flex-shrink: 0;
}
.fund-steps li code {
  background: var(--line-soft); padding: 2px 8px;
  border-radius: 6px;
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 13px; font-weight: 700;
  color: var(--ink);
}

@media (max-width: 760px) {
  .fund-methods { grid-template-columns: 1fr; }
  .fund-instructions__head { flex-direction: column; }
  .fund-instructions__amount { text-align: left; }
}

/* ============================================================
   v2.4 — clickable phase tabs, side drawer messages, build phase
   ============================================================ */

/* Milestone header */
.ms-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 18px; margin-bottom: 18px;
}
.ms-head__actions { display: flex; gap: 10px; align-items: center; }

/* Phase tabs (replaces .phase-track) */
.phase-tabs {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  margin: 6px 0 28px;
}
.phase-tab {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  color: var(--ink); text-decoration: none;
  transition: transform 120ms, border-color 120ms, box-shadow 120ms;
  position: relative;
}
a.phase-tab:hover { transform: translateY(-1px); border-color: var(--brand); color: var(--ink); }
.phase-tab__num {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  background: #eef4ff; color: var(--brand);
  font-size: 12px; font-weight: 900;
  border-radius: 10px;
}
.phase-tab__name { font-size: 13px; font-weight: 800; }
.phase-tab__sub { font-size: 11px; color: var(--muted); font-weight: 600; }

.phase-tab--completed { background: #f0fdf4; border-color: #bbf7d0; }
.phase-tab--completed .phase-tab__num { background: #dcfce7; color: #166534; }
.phase-tab--completed .phase-tab__sub { color: #166534; }

.phase-tab--pending { opacity: 0.65; cursor: not-allowed; }
.phase-tab--pending .phase-tab__num { background: var(--line-soft); color: var(--muted); }

.phase-tab.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(21, 94, 239, 0.25);
}
.phase-tab.is-active .phase-tab__num { background: rgba(255,255,255,0.22); color: #fff; }
.phase-tab.is-active .phase-tab__name { color: #fff; }
.phase-tab.is-active .phase-tab__sub { color: rgba(255,255,255,0.86); }

@media (max-width: 900px) {
  .phase-tabs { grid-template-columns: repeat(2, 1fr); }
}

/* Tab content container */
.ms-tab > h2 { margin-top: 0; }

/* ----- Messages drawer (slide-from-right) ----- */
.msg-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 92vw;
  background: #fff;
  box-shadow: -20px 0 60px rgba(15, 23, 42, 0.2);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 220ms cubic-bezier(.4,0,.2,1);
  z-index: 60;
}
.msg-drawer.is-open { transform: translateX(0); }
.msg-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fbff, #fff);
}
.msg-drawer__close {
  width: 36px; height: 36px;
  border: 0; background: transparent; cursor: pointer;
  font-size: 26px; line-height: 1; color: var(--muted);
  border-radius: 10px;
}
.msg-drawer__close:hover { background: var(--line-soft); color: var(--ink); }
.msg-drawer__body {
  flex: 1; overflow-y: auto; padding: 16px 20px;
}
.msg-drawer__form {
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  background: #fff;
}
.msg-drawer__form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 12px; font: inherit; font-size: 14px;
  background: #fff; resize: vertical; outline: none;
}
.msg-drawer__form textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.1);
}
.msg-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.3);
  opacity: 0; pointer-events: none;
  transition: opacity 220ms;
  z-index: 55;
}
.msg-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
@media (max-width: 600px) {
  .msg-drawer { width: 100%; max-width: 100%; }
}

/* ----- Plan items ----- */
.plan-items { list-style: none; margin: 0; padding: 0; }
.plan-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.plan-item--complete { background: #f0fdf4; border-color: #bbf7d0; }
.plan-item--blocked  { background: #fef2f2; border-color: #fecaca; }
.plan-item__head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; margin-bottom: 6px;
}
.plan-item__head strong { font-size: 15px; }
.plan-item__desc {
  font-size: 14px; color: var(--ink-soft);
  margin-bottom: 8px; white-space: pre-wrap;
}
.plan-item__meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 12px; color: var(--ink-soft);
  margin-top: 6px;
}
.plan-item__meta strong { color: var(--ink); }
.plan-item__notes {
  margin-top: 8px; padding: 8px 12px;
  background: #f8fafc; border-radius: 10px;
  font-size: 13px; color: var(--ink-soft); font-style: italic;
}
.plan-item__form {
  display: grid; grid-template-columns: auto 1fr 1fr auto;
  gap: 8px; margin-top: 12px;
  padding-top: 10px; border-top: 1px dashed var(--line-soft);
}
.plan-item__form select,
.plan-item__form input {
  padding: 8px 12px; font-size: 13px;
}
@media (max-width: 760px) {
  .plan-item__form { grid-template-columns: 1fr; }
}

/* ----- Build updates ----- */
.build-updates { display: flex; flex-direction: column; gap: 10px; }
.build-update {
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
}
.build-update--blocker    { border-color: #fecaca; background: #fffafa; }
.build-update--completion { border-color: #bbf7d0; background: #f7fef9; }
.build-update__head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.build-update__body {
  font-size: 14px; line-height: 1.5;
}
.build-update__imgs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 10px;
}
.build-update__imgs img {
  width: 110px; height: 110px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

/* ============================================================
   v2.5 — dashboard phase+actor cell, inspection UI
   ============================================================ */

/* Dashboard phase column: pill + actor label stacked */
.phase-cell {
  display: flex; flex-direction: column; gap: 4px;
  align-items: flex-start;
}
.phase-actor {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: uppercase;
}
.phase-actor.is-me {
  color: #c2410c;
  background: #fff7ed;
  border-radius: 999px;
  padding: 2px 8px;
}

/* Iteration history strip on Inspect tab */
.insp-iterations {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.insp-iter {
  display: inline-flex; gap: 6px; align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  background: var(--card); border: 1px solid var(--line);
}
.insp-iter--done   { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.insp-iter--bad    { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.insp-iter--active { background: #eef4ff; border-color: #bfdbfe; color: #1e40af; }
.insp-iter--warn   { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* Inspection items list */
.insp-items { list-style: none; margin: 0; padding: 0; }
.insp-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.insp-item--pass { background: #f0fdf4; border-color: #bbf7d0; }
.insp-item--fail { background: #fef2f2; border-color: #fecaca; }
.insp-item--na   { background: #f8fafc; }
.insp-item__head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; margin-bottom: 6px;
}
.insp-item__head strong { font-size: 15px; }
.insp-item__desc { font-size: 14px; color: var(--ink-soft); margin-bottom: 8px; white-space: pre-wrap; }
.insp-item__meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 12px; color: var(--ink-soft); margin-top: 6px;
}
.insp-item__meta strong { color: var(--ink); }
.insp-item__reason {
  margin-top: 8px; padding: 8px 12px;
  background: #fff;
  border: 1px solid #fecaca; border-radius: 10px;
  font-size: 13px; color: #991b1b;
}
.insp-item__form {
  display: grid; grid-template-columns: 140px 1fr 1fr auto;
  gap: 8px; margin-top: 12px;
  padding-top: 10px; border-top: 1px dashed var(--line-soft);
}
.insp-item__form select,
.insp-item__form input {
  padding: 8px 12px; font-size: 13px;
}
@media (max-width: 760px) {
  .insp-item__form { grid-template-columns: 1fr; }
}

/* ============================================================
   v2.6 — per-item progress, fee panel
   ============================================================ */

.item-progress {
  display: flex; align-items: center; gap: 10px;
  margin: 6px 0 10px;
}
.item-progress__bar {
  flex: 1; height: 8px;
  background: var(--line-soft);
  border-radius: 999px;
  overflow: hidden;
}
.item-progress__bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 999px;
  transition: width 240ms ease;
}
.item-progress__pct {
  font-size: 12px; font-weight: 800;
  color: var(--ink-soft);
  min-width: 36px; text-align: right;
}
.plan-item--complete .item-progress__bar > span {
  background: linear-gradient(90deg, #16a34a, #22c55e);
}
.plan-item--blocked .item-progress__bar > span {
  background: linear-gradient(90deg, #dc2626, #ef4444);
}

.plan-item__form { grid-template-columns: 130px 110px 1fr 1fr auto !important; }
@media (max-width: 880px) {
  .plan-item__form { grid-template-columns: 1fr !important; }
}

/* Fee panel */
.fee-panel {
  border: 1px solid #fde68a;
  background: #fffbeb;
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.fee-panel--paid {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.fee-panel--cancelled {
  background: #f8fafc;
  border-color: var(--line);
  opacity: 0.7;
}
.fee-panel__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px;
}
.fee-methods {
  display: flex; flex-direction: column; gap: 8px;
}
.fee-method {
  display: flex; align-items: center;
  gap: 6px;
  margin: 0;
}
.fee-method input[type="text"] {
  padding: 7px 12px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff;
  flex: 1; min-width: 0;
}

/* ============================================================
   v2.7 — notifications / event feed
   ============================================================ */
.event-feed { list-style: none; margin: 18px 0 0; padding: 0; }
.event-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px;
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
}
.event-item__icon {
  flex: 0 0 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--line-soft, #eef2f7);
  font-size: 16px; font-weight: 800;
  color: var(--ink-soft, #475569);
}
.event-item--milestone_complete .event-item__icon {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
}
.event-item--phase_completed .event-item__icon {
  background: #ecfdf5; color: #16a34a;
}
.event-item__title { font-weight: 800; font-size: 14px; }
.event-item__sub   { color: var(--ink-soft, #475569); font-size: 13px; margin-top: 2px; }
.event-item__meta  { font-size: 12px; margin-top: 6px; }

/* event grouping by project */
.event-group { margin-top: 22px; }
.event-group:first-of-type { margin-top: 18px; }
.event-group__head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0 4px 8px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 10px;
}
.event-group .event-feed { margin-top: 0; }

/* ============================================================
   v3.0 — marketplace
   ============================================================ */
.mk-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-top: 18px;
}
.mk-card {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 16px;
  background: #fff; padding: 16px 18px;
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.mk-card:hover { box-shadow: 0 8px 24px rgba(15,23,42,.08); transform: translateY(-2px); }
.mk-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.mk-card__desc { font-size: 13px; color: var(--ink-soft, #475569); margin: 8px 0; }
.mk-card__meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--ink-soft, #475569); margin-top: 8px; }
.mk-card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft, #eef2f7); }

.proposal {
  border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 12px;
}
.proposal--awarded   { border-color: #bbf7d0; background: #f0fdf4; }
.proposal--shortlisted { border-color: #bfdbfe; background: #f5f9ff; }
.proposal--declined  { opacity: .6; }
.proposal__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.proposal__figures { display: flex; gap: 12px; align-items: baseline; }
.proposal__note { margin: 8px 0 0; font-size: 13px; white-space: pre-wrap; }
.proposal__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.proposal__actions form { margin: 0; display: flex; align-items: center; }
.proposal__actions input[type="text"] { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }

/* v3.0.1 — create-flow mode toggle */
.mode-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 16px; }
@media (max-width: 680px){ .mode-toggle { grid-template-columns: 1fr; } }
.mode-opt {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer;
}
.mode-opt:has(input:checked) { border-color: var(--brand); background: #f5f9ff; box-shadow: 0 0 0 1px var(--brand) inset; }
.mode-opt input { margin-top: 3px; }
.mode-opt__body { display: flex; flex-direction: column; gap: 2px; }
.mode-opt__body .muted { font-size: 12px; }

/* v3.1 — project agreement budget tracker */
.agreement-bar__track {
  height: 12px; background: var(--line-soft, #eef2f7);
  border-radius: 999px; overflow: hidden;
}
.agreement-bar__track > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 999px; transition: width 240ms ease;
}
.agreement-figs {
  display: flex; flex-wrap: wrap; gap: 18px; margin-top: 10px; font-size: 13px;
}

/* v3.2 — marketplace scope lines */
.ms-line { padding: 10px 0; border-bottom: 1px solid var(--line-soft, #eef2f7); }
.ms-line:last-child { border-bottom: 0; }
.ms-line__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ms-line__desc { margin: 6px 0 0; font-size: 13px; color: var(--ink-soft, #475569); white-space: pre-wrap; }
