:root {
  --fp-paper: #F3F0EA;
  --fp-card: #FFFFFF;
  --fp-ink: #17140F;
  --fp-graphite: #5C5548;
  --fp-muted: #7A7264;
  --fp-rule: #E1DBD1;
  --fp-rule-soft: #EBE6DC;
  --fp-amber: #E8A33D;
  --fp-amber-hover: #DE9629;
  --fp-amber-border: #C98A11;
  --fp-link: #A8690A;
  --fp-won: #2C5F44;
  --fp-risk: #B23A2E;
  --fp-nav: #151310;
  --fp-header: #FBF9F5;
  --fp-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --fp-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --fp-serif: 'Source Serif 4', Georgia, serif;
  --fp-shadow: 0 1px 2px rgba(23, 20, 15, .04);
  --fp-radius: 7px;
}

html, body { margin: 0; padding: 0; background: var(--fp-paper); -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
a { color: var(--fp-link); text-decoration: none; }
a:hover { color: #7E4E06; text-decoration: underline; }
button, input, select, textarea { font-family: inherit; }
body { color: var(--fp-ink); font-family: var(--fp-sans); font-size: 13px; line-height: 1.45; }

.mono { font-family: var(--fp-mono); }

.fp-app { display: flex; min-height: 100vh; background: var(--fp-paper); }

/* —— Nav —— */
.fp-nav {
  width: 238px; flex: none; background: var(--fp-nav); color: #EFE9DF;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.fp-nav__brand { padding: 22px 20px 18px; border-bottom: 1px solid rgba(239,233,223,.1); }
.fp-nav__logo-row { display: flex; align-items: center; gap: 9px; }
.fp-nav__mark {
  width: 22px; height: 22px; flex: none; background: var(--fp-amber); border-radius: 3px;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: var(--fp-nav);
}
.fp-nav__name { font-weight: 600; font-size: 14px; letter-spacing: .01em; }
.fp-nav__name span { font-weight: 400; color: #B8AE9E; }
.fp-nav__org { margin-top: 14px; font-size: 11px; color: #8C8377; letter-spacing: .06em; text-transform: uppercase; }
.fp-nav__trade { margin-top: 3px; font-size: 11.5px; color: #B8AE9E; }
.fp-nav__switch { display: block; margin-top: 12px; }
.fp-nav__switch-label {
  display: block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: #8C8377; margin-bottom: 5px;
}
.fp-nav__switch select {
  width: 100%; background: rgba(239,233,223,.08); color: #F5F0E7; border: 1px solid rgba(239,233,223,.16);
  border-radius: 5px; padding: 7px 8px; font-size: 12px;
}
.fp-nav__user { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(239,233,223,.08); }
.fp-nav__user a { color: #D8CFC1; }
.fp-nav__user a:hover { color: #fff; }
.fp-nav__links { padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.fp-nav__link {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0;
  padding: 9px 11px; border-radius: 5px; font-size: 13px; font-weight: 500; letter-spacing: .005em;
  background: transparent; color: #B8AE9E; text-decoration: none; cursor: pointer;
}
.fp-nav__link:hover { background: rgba(239,233,223,.09); color: #F5F0E7; text-decoration: none; }
.fp-nav__link.is-active { background: rgba(239,233,223,.11); color: #FBF7F0; }
.fp-nav__bar { width: 3px; height: 15px; border-radius: 2px; flex: none; background: transparent; }
.fp-nav__link.is-active .fp-nav__bar { background: var(--fp-amber); }
.fp-nav__label { flex: 1; }
.fp-nav__badge {
  font-family: var(--fp-mono); font-size: 10.5px; padding: 2px 6px; border-radius: 9px;
  background: rgba(239,233,223,.14); color: #D8CFC1; font-weight: 600;
}
.fp-nav__badge.is-warn { background: var(--fp-risk); color: #FFF3EF; }
.fp-nav__meta {
  padding: 14px 20px 18px; border-top: 1px solid rgba(239,233,223,.1); font-size: 11.5px; color: #8C8377;
}
.fp-nav__meta div { display: flex; justify-content: space-between; margin-bottom: 5px; }
.fp-nav__meta div:last-child { margin-bottom: 0; }
.fp-nav__meta .mono { color: #D8CFC1; }

/* —— Main —— */
.fp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fp-header {
  position: sticky; top: 0; z-index: 20; background: var(--fp-header);
  border-bottom: 1px solid #DFD9CE; padding: 18px 28px 16px;
  display: flex; align-items: flex-end; gap: 24px;
}
.fp-header__row { display: contents; }
.fp-header__titles { flex: 1; min-width: 0; }
.fp-header h1 {
  margin: 0; font-family: var(--fp-serif); font-size: 23px; font-weight: 600; letter-spacing: -.01em;
}
.fp-header__sub, .fp-header p { margin: 4px 0 0; font-size: 12.5px; color: #6E675B; }
.fp-header__actions { display: flex; align-items: center; gap: 8px; }
.fp-only-mobile { display: none !important; }
.fp-only-desktop { display: block; }

.fp-search {
  display: flex; align-items: center; gap: 7px; background: #fff; border: 1px solid #DFD9CE;
  border-radius: 5px; padding: 7px 10px; width: 250px;
}
.fp-search__icon { color: #9A9284; font-size: 12px; }
.fp-search input { border: 0; outline: 0; flex: 1; font-size: 12.5px; background: transparent; color: var(--fp-ink); }

.fp-btn {
  border-radius: 5px; font-size: 12.5px; font-weight: 500; padding: 8px 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; border: 1px solid transparent;
}
.fp-btn:hover { text-decoration: none; }
.fp-btn--secondary { border-color: #DFD9CE; background: #fff; color: #3D372E; }
.fp-btn--secondary:hover { border-color: #C4BBAA; background: #F7F4EE; color: #3D372E; }
.fp-btn--primary { border-color: var(--fp-amber-border); background: var(--fp-amber); color: var(--fp-nav); font-weight: 600; padding: 8px 14px; }
.fp-btn--primary:hover { background: var(--fp-amber-hover); color: var(--fp-nav); }
.fp-btn--primary:disabled { opacity: .55; cursor: not-allowed; }

.fp-input {
  width: 100%; margin-top: 5px; border: 1px solid #DFD9CE; background: #fff; border-radius: 5px;
  padding: 8px 10px; font-size: 12.5px; color: var(--fp-ink); outline: none;
}
.fp-input:focus { border-color: #C4BBAA; box-shadow: 0 0 0 3px rgba(232,163,61,.18); }
textarea.fp-input { resize: vertical; min-height: 72px; font-family: inherit; }
select.fp-input { cursor: pointer; }
.fp-check-label {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: #3D372E; cursor: pointer;
  text-transform: none; letter-spacing: 0; font-weight: 500;
}
.fp-form-error { margin: 14px 0 0; font-size: 12.5px; color: var(--fp-risk); font-weight: 500; }

.fp-modal-root[hidden] { display: none !important; }
.fp-modal-root {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 18px;
}
.fp-modal__scrim { position: absolute; inset: 0; background: rgba(23,20,15,.35); border: 0; cursor: pointer; }
.fp-modal {
  position: relative; width: min(560px, 100%); max-height: min(92vh, 820px); overflow: auto;
  background: var(--fp-paper); border: 1px solid var(--fp-rule); border-radius: 8px;
  box-shadow: 0 16px 40px rgba(23,20,15,.18); animation: fp-fade .2s ease;
}
.fp-modal__head {
  position: sticky; top: 0; z-index: 1; display: flex; gap: 12px; align-items: flex-start;
  justify-content: space-between; padding: 18px 20px; background: var(--fp-header);
  border-bottom: 1px solid #DFD9CE;
}
.fp-modal__head > div:first-child { flex: 1; min-width: 0; }
.fp-modal__head .fp-drawer__close { flex: none; margin-left: auto; }
.fp-modal__head h2 { margin: 0; font-family: var(--fp-serif); font-size: 20px; font-weight: 600; }
.fp-modal__head p { margin: 4px 0 0; font-size: 12px; color: #6E675B; }
.fp-modal__body { padding: 18px 20px 20px; }
.fp-modal__foot {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--fp-rule-soft);
}
.fp-btn--ghost { border: 0; background: transparent; color: var(--fp-link); font-weight: 500; padding: 0; cursor: pointer; font-size: 12px; }
.fp-btn--ghost:hover { color: #7E4E06; text-decoration: underline; }

.fp-content { animation: fp-fade .25s ease; }
@keyframes fp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fp-slide { from { transform: translateX(26px); opacity: .4; } to { transform: translateX(0); opacity: 1; } }

.fp-pad { padding: 22px 28px 40px; }
.fp-subbar {
  padding: 14px 28px; border-bottom: 1px solid #E4DFD5; background: var(--fp-header);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}

/* —— Cards / tables —— */
.fp-card {
  background: var(--fp-card); border: 1px solid var(--fp-rule); border-radius: var(--fp-radius);
  box-shadow: var(--fp-shadow);
}
.fp-card__head {
  padding: 14px 17px 12px; border-bottom: 1px solid var(--fp-rule-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.fp-card__head h2 { margin: 0; font-size: 13.5px; font-weight: 600; }
.fp-card__head p { margin: 2px 0 0; font-size: 11.5px; color: var(--fp-muted); }

.fp-kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 13px; }
.fp-kpi {
  background: #fff; border: 1px solid var(--fp-rule); border-radius: var(--fp-radius);
  padding: 15px 16px 14px; box-shadow: var(--fp-shadow); display: flex; flex-direction: column; gap: 2px;
}
.fp-kpi__top { display: flex; align-items: center; justify-content: space-between; }
.fp-kpi__label { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fp-muted); }
.fp-kpi__dot { width: 6px; height: 6px; border-radius: 50%; }
.fp-kpi__value { font-family: var(--fp-mono); font-size: 25px; font-weight: 600; letter-spacing: -.02em; margin-top: 6px; }
.fp-kpi__sub { font-size: 11.5px; color: #6E675B; margin-top: 2px; }
.fp-kpi__note { font-size: 11.5px; font-weight: 500; margin-top: 7px; }

.fp-grid-2 { display: grid; gap: 16px; margin-top: 16px; align-items: start; }
.fp-grid-2--due { grid-template-columns: 1.35fr 1fr; }
.fp-grid-2--load { grid-template-columns: 1fr 1.35fr; }
.fp-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }

table.fp-table { width: 100%; border-collapse: collapse; }
table.fp-table th {
  text-align: left; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: #8C8478; padding: 9px 17px; border-bottom: 1px solid var(--fp-rule-soft); white-space: nowrap;
}
table.fp-table th.right, table.fp-table td.right { text-align: right; }
table.fp-table tbody tr { border-bottom: 1px solid #F2EEE6; }
table.fp-table tbody tr.is-clickable { cursor: pointer; }
table.fp-table tbody tr.is-clickable:hover { background: #FBF8F2; }
table.fp-table td { padding: 14px; vertical-align: top; }
table.fp-table thead.band th { background: #F7F4EE; border-bottom: 1px solid var(--fp-rule); padding: 11px 14px; }
table.fp-table th.fp-th-sort { padding: 0; }
table.fp-table th.fp-th-sort a {
  display: block; padding: 11px 14px; color: #8C8478; text-decoration: none;
  font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
table.fp-table th.fp-th-sort a:hover { color: var(--fp-ink); background: #F1EDE4; text-decoration: none; }
table.fp-table th.fp-th-sort.is-active a { color: var(--fp-ink); }
table.fp-table th.fp-th-sort.right a { text-align: right; }

.fp-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 4px;
  font-size: 11.5px; font-weight: 600; font-family: var(--fp-mono); white-space: nowrap;
}
.fp-chip {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 11px; white-space: nowrap;
}
.fp-avatar {
  width: 22px; height: 22px; flex: none; border-radius: 50%; color: var(--fp-nav);
  font-size: 9.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--fp-mono);
}
.fp-avatar--lg { width: 28px; height: 28px; font-size: 10.5px; }
.fp-avatar-row { display: flex; align-items: center; gap: 7px; }
.fp-hot { font-size: 10px; font-weight: 700; color: var(--fp-risk); letter-spacing: .05em; }
.fp-bar { height: 4px; border-radius: 2px; background: #EDE8DE; overflow: hidden; }
.fp-bar > i { display: block; height: 100%; background: var(--fp-amber); }
.fp-bar--thick { height: 10px; }
.fp-bar--report { height: 8px; }

.fp-linkish { color: var(--fp-link); font-size: 12px; font-weight: 500; cursor: pointer; background: none; border: 0; padding: 0; }
.fp-muted { color: var(--fp-muted); }
.fp-strong { font-weight: 600; }

/* —— Dashboard extras —— */
.fp-hot-item {
  padding: 11px 9px; border-radius: 5px; cursor: pointer; display: flex; gap: 12px; align-items: flex-start;
}
.fp-hot-item:hover { background: #FBF8F2; }

.fp-due-list { padding: 4px 0; }
.fp-due-item {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left;
  border: 0; border-bottom: 1px solid #F2EEE6; background: transparent; cursor: pointer;
  padding: 13px 17px; font: inherit; color: inherit;
}
.fp-due-item:last-child { border-bottom: 0; }
.fp-due-item:hover { background: #FBF8F2; }
.fp-due-item__main { flex: 1; min-width: 0; }
.fp-due-item__title { font-weight: 600; font-size: 12.5px; line-height: 1.35; text-wrap: pretty; }
.fp-due-item__sub { font-size: 11.5px; color: #7A7264; margin-top: 3px; }
.fp-due-item__foot {
  display: flex; align-items: center; gap: 8px; margin-top: 9px; flex-wrap: wrap;
}
.fp-due-item__when { font-size: 11px; font-weight: 500; }
.fp-due-item__est { font-size: 12px; color: #3D372E; margin-left: auto; }
.fp-due-item__value { font-size: 12.5px; font-weight: 600; white-space: nowrap; padding-top: 1px; }

.fp-mobile-list { display: none; }
.fp-mobile-action {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  border-bottom: 1px solid #F2EEE6;
}
.fp-mobile-action:last-child { border-bottom: 0; }
.fp-mobile-action__body { flex: 1; min-width: 0; }
.fp-mobile-action__top { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.fp-mobile-action__title { font-size: 13px; font-weight: 500; line-height: 1.35; text-wrap: pretty; }
.fp-mobile-action__top .mono { font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.fp-mobile-action__sub { font-size: 11.5px; color: #7A7264; margin-top: 4px; cursor: pointer; }
.fp-mobile-action__meta { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 9px; font-size: 12px; color: #3D372E; }
.fp-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.fp-comments { margin-top: 8px; }
.fp-comments__toggle {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  color: var(--fp-link); font-size: 11.5px; font-weight: 500;
}
.fp-comments__toggle:hover { color: #7E4E06; text-decoration: underline; }
.fp-comments__panel {
  margin-top: 8px; padding: 10px 12px; background: #FBF9F5; border: 1px solid #EBE6DC; border-radius: 5px;
}
.fp-comments__panel[hidden] { display: none !important; }
.fp-comments__list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.fp-comments__list:empty { display: none; margin-bottom: 0; }
.fp-comment {
  padding: 8px 10px; background: #fff; border: 1px solid #EBE6DC; border-radius: 4px;
}
.fp-comment__meta {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 11px; color: #8C8478; margin-bottom: 4px;
}
.fp-comment__meta .mono { font-size: 10.5px; }
.fp-comment__body { font-size: 12.5px; color: #2C2720; line-height: 1.45; white-space: pre-wrap; }
.fp-comments__form .fp-input { margin-top: 0; }
.fp-comments__form-row {
  display: flex; gap: 8px; align-items: center; margin-top: 8px; justify-content: flex-end;
}
.fp-comments__form-row .fp-select { min-width: 140px; }
.fp-load-row { margin-bottom: 13px; }
.fp-load-row:last-child { margin-bottom: 0; }
.fp-action-row {
  display: flex; gap: 11px; align-items: flex-start; padding: 12px 17px; border-bottom: 1px solid #F2EEE6;
}
.fp-action-row:last-child { border-bottom: 0; }

.fp-check {
  width: 16px; height: 16px; flex: none; margin-top: 1px; border-radius: 3px; border: 1.5px solid #C4BBAA;
  background: #fff; cursor: pointer; color: var(--fp-nav); font-size: 10px; line-height: 1; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.fp-check.is-done { background: #7C9A6B; border-color: #7C9A6B; }

.fp-seg { display: flex; border: 1px solid #DFD9CE; border-radius: 5px; overflow: hidden; background: #fff; }
.fp-seg button, .fp-seg a {
  border: 0; border-left: 1px solid #DFD9CE; padding: 7px 14px; font-size: 12.5px; font-weight: 500;
  cursor: pointer; background: #fff; color: #5C5548; text-decoration: none;
}
.fp-seg > :first-child { border-left: 0; }
.fp-seg .is-active { background: var(--fp-ink); color: #FBF7F0; }
.fp-select {
  border: 1px solid #DFD9CE; background: #fff; border-radius: 5px; padding: 7px 10px;
  font-size: 12.5px; color: #3D372E; cursor: pointer;
}
.fp-filter-btn {
  border: 1px solid #DFD9CE; background: #fff; color: #5C5548; border-radius: 5px;
  padding: 7px 12px; font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.fp-filter-btn.is-on { background: #FBF0EC; color: var(--fp-risk); border-color: #E8CFC9; }

/* —— Board —— */
.fp-board-wrap { overflow-x: auto; padding: 18px 28px 40px; }
.fp-board { display: flex; gap: 13px; align-items: flex-start; min-width: 1720px; }
.fp-col {
  flex: 1; min-width: 206px; background: #EEEAE2; border: 1px solid var(--fp-rule);
  border-radius: var(--fp-radius); display: flex; flex-direction: column;
}
.fp-col__head { padding: 11px 12px 10px; border-bottom: 1px solid var(--fp-rule); }
.fp-col__title { display: flex; align-items: center; gap: 7px; }
.fp-col__dot { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.fp-col__label { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; flex: 1; }
.fp-col__count { font-size: 11px; font-family: var(--fp-mono); color: var(--fp-muted); }
.fp-col__total { font-family: var(--fp-mono); font-size: 12px; color: var(--fp-graphite); margin-top: 6px; font-weight: 500; }
.fp-col__body { padding: 9px; display: flex; flex-direction: column; gap: 9px; min-height: 80px; }
.fp-opp-card {
  background: #fff; border: 1px solid var(--fp-rule); border-left-width: 3px; border-radius: 5px;
  padding: 11px 11px 10px; cursor: grab; box-shadow: var(--fp-shadow); text-align: left; width: 100%;
  user-select: none; touch-action: none;
}
.fp-opp-card:hover { border-color: #C4BBAA; box-shadow: 0 2px 6px rgba(23,20,15,.09); }
.fp-opp-card:active { cursor: grabbing; }
.fp-opp-card.is-dragging { opacity: .45; box-shadow: none; }
.fp-col__body.is-drop-target {
  outline: 2px dashed #E8A33D; outline-offset: -2px; background: rgba(232,163,61,.08); border-radius: 0 0 6px 6px;
}
.fp-col__body.is-drop-target .fp-empty-stage { border-color: #E8A33D; color: #8A5906; }
.fp-opp-card__contractor { font-size: 10.5px; color: var(--fp-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.fp-opp-card__project { font-size: 12.5px; font-weight: 600; margin-top: 4px; line-height: 1.3; text-wrap: pretty; }
.fp-opp-card__meta { display: flex; align-items: baseline; justify-content: space-between; margin-top: 9px; }
.fp-opp-card__value { font-family: var(--fp-mono); font-size: 13px; font-weight: 600; }
.fp-opp-card__foot {
  display: flex; align-items: center; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #F2EEE6;
}
.fp-empty-stage {
  border: 1px dashed #D3CCBE; border-radius: 5px; padding: 16px 10px; text-align: center;
  font-size: 11.5px; color: #8C8478; line-height: 1.5;
}

.fp-empty {
  padding: 52px 28px; text-align: center;
}
.fp-empty__icon {
  width: 38px; height: 38px; margin: 0 auto 14px; border: 1px dashed #C4BBAA; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; color: #A79E8E; font-size: 16px;
}
.fp-empty__icon.is-ok { border: 1px solid #CFE0CF; background: #EEF5EE; color: #3F6B47; }

.fp-callout {
  margin-top: 16px; background: #FBF6EA; border: 1px solid #EBDCBD; border-radius: var(--fp-radius);
  padding: 15px 17px; display: flex; gap: 14px; align-items: flex-start;
}
.fp-callout__mark {
  width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--fp-amber); color: var(--fp-nav);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.fp-callout ul { margin: 7px 0 0; padding-left: 17px; font-size: 12.5px; color: #3D372E; line-height: 1.65; }

/* —— Report —— */
.fp-report-shell { padding: 26px 28px; display: flex; justify-content: center; }
.fp-report {
  width: 880px; max-width: 100%; background: #fff; border: 1px solid var(--fp-rule); border-radius: 5px;
  box-shadow: 0 2px 10px rgba(23,20,15,.06); padding: 44px 52px 48px;
}
.fp-report__top {
  display: flex; align-items: flex-start; justify-content: space-between;
  border-bottom: 2px solid var(--fp-ink); padding-bottom: 16px;
}
.fp-report__eyebrow { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #8C8478; }
.fp-report h2 {
  margin: 8px 0 0; font-family: var(--fp-serif); font-size: 29px; font-weight: 700; letter-spacing: -.015em;
}
.fp-report__lede {
  margin: 22px 0 0; font-family: var(--fp-serif); font-size: 16px; line-height: 1.6; color: #2C2720; text-wrap: pretty;
}
.fp-report h3 {
  margin: 30px 0 0; font-family: var(--fp-serif); font-size: 17px; font-weight: 600;
  padding-bottom: 7px; border-bottom: 1px solid var(--fp-rule);
}
.fp-report-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 24px;
  border: 1px solid var(--fp-rule); border-radius: 5px; overflow: hidden;
}
.fp-report-stats > div { padding: 14px 16px; border-right: 1px solid var(--fp-rule); background: var(--fp-header); }
.fp-report-stats > div:last-child { border-right: 0; }
.fp-report__foot {
  margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--fp-rule);
  font-size: 11.5px; color: #8C8478; display: flex; justify-content: space-between;
}

/* —— Drawer —— */
.fp-drawer-root[hidden] { display: none !important; }
.fp-drawer-root {
  position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end;
}
.fp-drawer__scrim { position: absolute; inset: 0; background: rgba(23,20,15,.28); border: 0; cursor: pointer; }
.fp-drawer {
  position: relative; width: min(480px, 100%); height: 100%; background: var(--fp-paper);
  border-left: 1px solid var(--fp-rule); box-shadow: -8px 0 24px rgba(23,20,15,.12);
  overflow-y: auto; animation: fp-slide .22s ease; padding: 0 0 40px;
}
.fp-drawer__head {
  position: sticky; top: 0; z-index: 2; background: var(--fp-header);
  border-bottom: 1px solid #DFD9CE; padding: 16px 20px; display: flex; gap: 12px; align-items: flex-start;
  justify-content: space-between;
}
.fp-drawer__head-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.fp-opp-edit[hidden], #fp-opp-view[hidden] { display: none !important; }
.fp-drawer__body { padding: 18px 20px; }
.fp-drawer__close {
  border: 1px solid #DFD9CE; background: #fff; border-radius: 5px; width: 32px; height: 32px;
  cursor: pointer; font-size: 16px; color: var(--fp-graphite); flex: none;
}
.fp-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.fp-field label {
  display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #8C8478;
}
.fp-field .val { margin-top: 5px; font-size: 13px; font-weight: 500; }
.fp-field .note { margin-top: 3px; font-size: 11.5px; color: var(--fp-muted); }
.fp-hist { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.fp-hist__row { display: flex; gap: 11px; }
.fp-hist__rail { display: flex; flex-direction: column; align-items: center; flex: none; padding-top: 4px; }
.fp-hist__dot { width: 7px; height: 7px; border-radius: 50%; background: #C4BBAA; }
.fp-hist__line { width: 1px; flex: 1; background: var(--fp-rule-soft); margin-top: 3px; }

/* Mobile chrome (hidden on desktop) */
.fp-menu-btn,
.fp-nav__close,
.fp-nav-scrim,
.fp-btn__short { display: none; }
.fp-btn__long { display: inline; }

@media (max-width: 1200px) {
  .fp-kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .fp-grid-2--due, .fp-grid-2--load { grid-template-columns: 1fr; }
  .fp-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .fp-app { flex-direction: column; }
  .fp-only-desktop { display: none !important; }
  .fp-only-mobile { display: block !important; }
  .fp-mobile-list { display: block !important; }

  .fp-nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 40;
    background: rgba(23, 20, 15, .45); border: 0; padding: 0; cursor: pointer;
  }
  .fp-nav-scrim[hidden] { display: none !important; }

  .fp-nav {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 45; width: min(300px, 78vw);
    transform: translateX(-105%); transition: transform .22s ease; box-shadow: none;
  }
  body.fp-nav-open .fp-nav { transform: translateX(0); box-shadow: 8px 0 28px rgba(23,20,15,.28); }
  body.fp-nav-open { overflow: hidden; }

  .fp-nav__close {
    display: flex; margin-left: auto; width: 32px; height: 32px; align-items: center; justify-content: center;
    border: 1px solid rgba(239,233,223,.2); background: transparent; color: #EFE9DF;
    border-radius: 5px; font-size: 20px; cursor: pointer; line-height: 1;
  }

  .fp-menu-btn {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 40px; height: 40px; flex: none; border: 1px solid #DFD9CE; background: #fff;
    border-radius: 5px; padding: 10px 9px; cursor: pointer;
  }
  .fp-menu-btn span { display: block; height: 2px; background: #3D372E; border-radius: 1px; }

  .fp-header {
    flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px 12px;
    position: sticky; top: 0;
  }
  .fp-header__row {
    display: flex; align-items: center; gap: 10px; width: 100%;
  }
  .fp-header__titles { flex: 1; min-width: 0; }
  .fp-header h1 { font-size: 20px; }
  .fp-header__sub {
    font-size: 11.5px; margin-top: 2px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .fp-header__actions {
    flex-wrap: wrap; gap: 8px; width: 100%;
    justify-content: flex-end;
  }
  .fp-search { width: 100%; flex: 1 1 100%; order: 2; }
  .fp-header__actions .fp-new-opp { order: 1; }
  .fp-btn__long { display: none; }
  .fp-btn__short { display: inline; }

  .fp-pad { padding: 12px 14px 28px; }
  .fp-subbar { padding: 10px 14px; gap: 8px; }
  .fp-board-wrap { padding: 12px 14px 28px; }

  /* Compact 2-up KPIs — avoid a tall stack of five */
  .fp-kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .fp-kpi { padding: 11px 12px 10px; }
  .fp-kpi__value { font-size: 19px; margin-top: 4px; }
  .fp-kpi__sub { font-size: 11px; }
  .fp-kpi__note { display: none; }
  .fp-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .fp-grid-4 { grid-template-columns: 1fr 1fr; gap: 8px; }

  .fp-card__head { flex-wrap: wrap; gap: 6px; padding: 12px 14px; }
  .fp-due-item { padding: 12px 14px; }
  .fp-due-item__est span:last-child { display: none; } /* avatar only on small screens */
  .fp-due-item__value { font-size: 13px; }

  .fp-report-shell { padding: 12px 12px 28px; }
  .fp-report { padding: 20px 16px 24px; }
  .fp-report h2 { font-size: 22px; }
  .fp-report__lede { font-size: 15px; }
  .fp-report-stats { grid-template-columns: 1fr 1fr; }
  .fp-report-stats > div { border-right: 0; border-bottom: 1px solid var(--fp-rule); }
  .fp-report-stats > div:nth-child(odd) { border-right: 1px solid var(--fp-rule); }
  .fp-report-stats > div:nth-last-child(-n+2) { border-bottom: 0; }

  .fp-drawer { width: 100%; max-width: 100%; }
  .fp-field-grid { grid-template-columns: 1fr; }

  .fp-callout { flex-direction: column; gap: 10px; }
  .fp-seg { width: 100%; }
  .fp-seg a, .fp-seg button { flex: 1; text-align: center; padding: 9px 10px; }
  .fp-select, .fp-filter-btn { min-height: 38px; }
  .fp-check { width: 22px; height: 22px; font-size: 12px; }
  .fp-nav__link { padding: 12px 11px; min-height: 44px; }

  /* Pipeline board: snap columns */
  .fp-board { min-width: 0; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .fp-col { min-width: min(280px, 82vw); scroll-snap-align: start; flex: 0 0 auto; }
  .fp-board-wrap::before {
    content: 'Swipe for stages →';
    display: block; font-size: 11px; color: #8C8478; margin: 0 0 10px; letter-spacing: .02em;
  }
}

@media (max-width: 560px) {
  .fp-grid-4 { grid-template-columns: 1fr; }
  .fp-report-stats { grid-template-columns: 1fr; }
  .fp-report-stats > div { border-right: 0 !important; border-bottom: 1px solid var(--fp-rule); }
  .fp-report-stats > div:last-child { border-bottom: 0; }
  .fp-report__top { flex-direction: column; gap: 12px; }
}

@media print {
  .fp-nav, .fp-header, .fp-subbar, .fp-drawer-root, .fp-menu-btn, .fp-nav-scrim { display: none !important; }
  .fp-app { display: block; }
  .fp-report { box-shadow: none; border: 0; width: 100%; padding: 0; }
}

/* —— Auth / companies —— */
.fp-auth {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 28px 16px; background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(232,163,61,.18), transparent 55%),
    linear-gradient(165deg, #F7F4EE 0%, #EDE7DC 45%, #F3F0EA 100%);
}
.fp-auth__card {
  width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--fp-rule);
  border-radius: 10px; padding: 28px 26px 24px; box-shadow: var(--fp-shadow);
}
.fp-auth__card--wide { max-width: 640px; }
.fp-auth__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.fp-auth__name { font-weight: 600; font-size: 15px; }
.fp-auth__tag { font-size: 12px; color: var(--fp-muted); margin-top: 2px; }
.fp-auth h1 {
  font-family: var(--fp-serif); font-size: 28px; font-weight: 600; margin: 0 0 8px;
  letter-spacing: -.02em;
}
.fp-auth__lead { margin: 0 0 18px; color: var(--fp-graphite); font-size: 13.5px; line-height: 1.5; }
.fp-auth__h2 { font-size: 14px; font-weight: 600; margin: 8px 0 0; }
.fp-auth__form { display: flex; flex-direction: column; gap: 12px; }
.fp-auth__form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 500; color: var(--fp-graphite); }
.fp-auth__form input {
  border: 1px solid var(--fp-rule); border-radius: 6px; padding: 9px 11px; font-size: 14px; color: var(--fp-ink);
  background: #fff;
}
.fp-auth__form input:focus { outline: 2px solid rgba(232,163,61,.35); border-color: var(--fp-amber-border); }
.fp-auth__optional { font-weight: 400; color: var(--fp-muted); }
.fp-auth__error, .fp-auth__ok, .fp-auth__empty {
  padding: 10px 12px; border-radius: 6px; margin-bottom: 14px; font-size: 13px;
}
.fp-auth__error { background: #F8E6E1; color: #B23A2E; }
.fp-auth__ok { background: #E4EFE7; color: #2C5F44; }
.fp-auth__empty { background: #F4F1EB; color: var(--fp-graphite); }
.fp-auth__alt { margin: 18px 0 0; font-size: 12.5px; color: var(--fp-muted); }
.fp-auth__form .fp-btn { margin-top: 4px; justify-content: center; }
.fp-company-list { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 10px; }
.fp-company-list__item {
  border: 1px solid var(--fp-rule); border-radius: 8px; padding: 14px; background: #FBF9F5;
  display: grid; gap: 10px;
}
.fp-company-list__item.is-active { border-color: #D4B06A; background: #FFFCF6; }
.fp-company-list__trade { display: block; margin-top: 3px; color: var(--fp-muted); font-size: 12px; }
.fp-company-list__badge {
  display: inline-block; margin-top: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: #8A5906; background: #FBF0DC; padding: 2px 7px; border-radius: 4px;
}
.fp-company-list__actions { display: flex; gap: 8px; }
.fp-company-list__edit { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 8px; }
.fp-company-list__edit input {
  border: 1px solid var(--fp-rule); border-radius: 6px; padding: 8px 10px; font-size: 13px;
}
@media (max-width: 640px) {
  .fp-company-list__edit { grid-template-columns: 1fr; }
}
