/* Fonts from the PriceHand website (all SIL Open Font License), served from this app so they work offline. */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/ibm-plex-sans.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-400.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-500.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/barlow-semi-condensed-600.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/barlow-semi-condensed-700.woff2) format('woff2'); }

:root {
  --bg: #f1f2ee; --panel: #fbfbf9; --ink: #16191c; --muted: #4a5158; --line: #c9ccc4;
  --accent: #0f5c4d; --accent-ink: #fff; --flag: #f8e3c8; --flag-edge: #5c2e04;
  --ok: #dce9e4; --ok-ink: #0f5c4d; --bad: #f6deda; --bad-ink: #8a1c13; --chip: #eef0ec;
}
* { box-sizing: border-box; }
body { margin: 0; font: 17px/1.5 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif; font-variant-numeric: tabular-nums; color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.badge { background: #5c2e04; color: #16191c; border-radius: 3px; padding: 0 7px; font-size: 14.5px; font-weight: 700; margin-left: 4px; }
.banner { background: #f8e3c8; border-bottom: 1px solid #e0c29c; padding: 6px 24px; font-size: 15px; color: #5c2e04; }
.banner.ai { background: #dce9e4; border-color: #a9c9be; }
main { max-width: 1400px; margin: 0 auto; padding: 22px 24px 60px; }
h1 { font-size: 25px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 0 0 10px; }
.sub { color: var(--muted); margin: 0 0 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; padding: 18px; margin-bottom: 18px; }
.msg, .err { padding: 12px 16px; border-radius: 3px; margin-bottom: 16px; font-size: 17px; font-weight: 600; }
.msg { background: var(--ok); color: var(--ok-ink); }
.err { background: var(--bad); color: var(--bad-ink); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 14.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.click:hover { background: #eef0ec; cursor: pointer; }
.btn { display: inline-block; border: 1px solid var(--line); background: #fbfbf9; color: var(--ink); padding: 10px 18px; min-height: 44px; border-radius: 3px; font: inherit; font-weight: 500; cursor: pointer; line-height: 1.3; }
.btn:hover { background: #eef0ec; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #0b4a3e; }
.btn.small { padding: 6px 12px; min-height: 36px; font-size: 14.5px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
input[type=text], input[type=number], input[type=email], input[type=search], select, textarea { font: inherit; border: 1px solid #8a9097; border-radius: 3px; padding: 9px 11px; min-height: 44px; background: #fbfbf9; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid #a9c9be; outline-offset: 0; border-color: var(--accent); }

/* customer line on a quote, with an inline edit form */
.custline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.custedit { position: relative; }
.custedit summary { list-style: none; cursor: pointer; color: var(--accent); font-size: 15.5px; font-weight: 500; }
.custedit summary::-webkit-details-marker { display: none; }
.custedit form { position: absolute; z-index: 20; top: 24px; left: 0; background: #fbfbf9; border: 1px solid var(--line); border-radius: 3px;
  box-shadow: none; padding: 14px; display: grid; gap: 8px; width: 300px; }
.custedit label { display: grid; gap: 3px; font-size: 14.5px; color: var(--muted); }
.custedit input { width: 100%; color: var(--ink); }

/* search box with a magnifier icon */
input[type=search] { -webkit-appearance: none; appearance: none; padding: 8px 12px 8px 34px; border-radius: 3px;
  background: #fbfbf9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a9097' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center; }
input[type=search]::-webkit-search-cancel-button { cursor: pointer; }

/* file pickers: the "Choose file" part looks like our buttons */
input[type=file] { font: inherit; font-size: 15.5px; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; font-size: 15.5px; color: var(--ink); background: #fbfbf9;
  border: 1px solid var(--line); border-radius: 3px; padding: 7px 14px; margin-right: 10px; cursor: pointer; }
input[type=file]::file-selector-button:hover { background: #eef0ec; }
.filepick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1.5px dashed #8a9097; border-radius: 3px;
  padding: 12px 14px; background: #eef0ec; }
.filepick .hint { font-size: 14.5px; color: var(--muted); }
textarea { width: 100%; font-size: 17px; line-height: 1.5; }
.copybox textarea { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 15.5px; }  /* price columns line up */
.pill { display: inline-block; padding: 1px 8px; border-radius: 3px; font-size: 14.5px; font-weight: 600; background: var(--chip); color: #2b3136; white-space: nowrap; }
.pill.draft { background: #eef0ec; } .pill.approved { background: #dce9e4; color: #0b4a3e; }
.pill.sent { background: #f8e3c8; color: #5c2e04; } .pill.replied { background: #eef0ec; color: #2b3136; }
.pill.won { background: var(--ok); color: var(--ok-ink); } .pill.lost { background: var(--bad); color: var(--bad-ink); }
.pill.high { background: var(--ok); color: var(--ok-ink); } .pill.medium { background: #f8e3c8; color: #5c2e04; } .pill.low { background: var(--bad); color: var(--bad-ink); }
.pill.sample { background: #eef0ec; color: #4a5158; font-weight: 500; }
.stats { display: flex; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.stat { background: #fbfbf9; border: 1px solid var(--line); border-radius: 3px; padding: 12px 16px; min-width: 170px; }
.stat b { display: block; font-size: 25px; }
.stat span { color: var(--muted); font-size: 14.5px; }
.muted { color: var(--muted); }
.small { font-size: 14.5px; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 15px; }

/* review screen */
.review { display: grid; grid-template-columns: minmax(260px, 28%) 1fr; gap: 18px; align-items: start; }
.source { position: sticky; top: 12px; max-height: calc(100vh - 110px); overflow: auto; }  /* stays put above the bottom bar */
.source summary { list-style: none; cursor: pointer; }
.source summary::-webkit-details-marker { display: none; }
.source pre { white-space: pre-wrap; word-break: break-word; font-size: 15px; margin: 0; color: #2b3136; }
.summary { border-radius: 3px; padding: 10px 14px; margin-bottom: 12px; font-size: 16px; }
.summary.warn { background: var(--flag); border: 1px solid #e0c29c; color: #5c2e04; }
.summary.good { background: var(--ok); border: 1px solid #a9c9be; color: var(--ok-ink); }
.cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.card { background: #fbfbf9; border: 1px solid var(--line); border-radius: 3px; padding: 12px 14px; }
.card.flagged { background: var(--flag); border-color: #e0c29c; box-shadow: inset 4px 0 0 var(--flag-edge); }
.card.notq { opacity: .55; }
.card.notq .part b, .card.notq .money b { text-decoration: line-through; }
.card-top { display: grid; grid-template-columns: 24px 1fr 96px 150px; gap: 12px; align-items: start; }
.card .n { color: var(--muted); font-weight: 600; padding-top: 1px; }
.card .asked { color: var(--muted); font-style: italic; font-size: 15px; margin-bottom: 3px; }
.card .desc { color: #2b3136; }
.card .qty { text-align: right; }
.card .qty input { width: 72px; text-align: right; }
.card .money { text-align: right; white-space: nowrap; }
.card-meta { margin: 8px 0 0 34px; font-size: 14.5px; color: #4a5158; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.card-meta .why { flex: 1 1 240px; }
.flagwhy { margin: 6px 0 0 34px; font-size: 15px; color: #5c2e04; font-weight: 600; }
.card-actions { margin: 12px 0 0 34px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.card-actions form { display: inline; }
.card-actions select { max-width: 260px; font-size: 14.5px; padding: 4px 6px; }
.card-actions .skuin { width: 200px; font-size: 16px; }
.card-actions .spacer { flex: 1; }
.btn.ok { background: var(--ok); border-color: #a9c9be; color: var(--ok-ink); font-weight: 600; }
.btn.ghost { border-color: transparent; color: var(--muted); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.blockers { color: #5c2e04; font-size: 15.5px; margin: 8px 0 0; padding-left: 18px; }
.timeline { display: flex; gap: 6px 18px; font-size: 14.5px; color: var(--muted); flex-wrap: wrap; }
.timeline b { color: var(--ink); font-weight: 600; }
.export { display: grid; grid-template-columns: 1fr; gap: 10px; }
.copybox textarea { min-height: 260px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1000px) {
  .review, .grid2 { grid-template-columns: 1fr; }
  .source { position: static; max-height: 260px; }
}
@media (max-width: 560px) {
  main { padding: 16px; }
  .card-top { grid-template-columns: 18px 1fr 90px; }
  .card .money { grid-column: 2 / -1; text-align: left; }
  .card-meta, .flagwhy, .card-actions { margin-left: 0; }
}
.nowrap { white-space: nowrap; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.tabs a { padding: 6px 12px; border-radius: 3px; color: #4a5158; font-weight: 500; font-size: 15.5px; border: 1px solid transparent; }
.tabs a span { color: var(--muted); font-size: 14.5px; margin-left: 3px; }
.tabs a:hover { background: #eef0ec; text-decoration: none; }
.tabs a.on { background: #fbfbf9; border-color: var(--line); color: var(--ink); box-shadow: none; }
.tabs a.due span { background: #5c2e04; color: #fbfbf9; border-radius: 3px; padding: 0 6px; font-weight: 700; }
.mailbtns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btn.mail { background: #dce9e4; border-color: #a9c9be; color: #0b4a3e; font-weight: 600; }
.btn.mail:hover { background: #dce9e4; }
.listbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.listbar .tabs { margin-bottom: 0; }
.searchbox { display: flex; gap: 6px; align-items: center; }
.searchbox input { width: 240px; }

/* branding + who's using it */
.logo-preview { background: #eef0ec; border-radius: 3px; padding: 14px; display: inline-block; }
.logo-preview img { max-height: 80px; max-width: 280px; display: block; }

/* ---------------------------------------------------------------- sidebar layout */
:root { --sb-w: 232px; --sb-wc: 64px; --sb-bg: #16191c; --sb-ink: #c9ced3; --sb-hover: #2b3136; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sb-w); background: var(--sb-bg); color: #fff; display: flex;
  flex-direction: column; z-index: 40; transition: width .18s ease; }
.content { margin-left: var(--sb-w); transition: margin-left .18s ease; min-width: 0; }
.sb-collapsed .sidebar { width: var(--sb-wc); }
.sb-collapsed .content { margin-left: var(--sb-wc); }
.sidebar .label { white-space: nowrap; overflow: hidden; transition: opacity .12s; }
.sb-collapsed .sidebar .label { opacity: 0; width: 0; pointer-events: none; }
.ico { width: 18px; height: 18px; flex: none; }

.sb-top { padding: 14px 12px 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-height: 36px; }
.brand:hover { text-decoration: none; }
.brand .logo { background: #fbfbf9; border-radius: 3px; height: 36px; min-width: 40px; max-width: 100%; padding: 3px 5px; display: grid; place-items: center; flex: none; }
.brand .logo img { max-height: 30px; max-width: 130px; display: block; }
.brand .logo.mark { background: var(--accent); color: #fff; font-weight: 700; font-size: 18px; width: 40px; }
.brand .label { font-weight: 700; font-size: 17px; line-height: 1.15; text-overflow: ellipsis; }
.brand .label small { display: block; font-size: 12px; font-weight: 500; color: #8a9097; letter-spacing: .5px; text-transform: uppercase; }
.sb-collapsed .brand .logo { min-width: 40px; width: 40px; }
.sb-collapsed .brand .logo img { max-width: 32px; }
.sidebar:has(.logo img) .brand { flex-wrap: wrap; }
:root:not(.sb-collapsed) .sidebar .brand:has(img) .label { flex-basis: 100%; }

.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 8px; flex: 1; overflow-y: auto; }
.sidebar nav a, .sb-toggle { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 3px; color: var(--sb-ink);
  font-weight: 500; font-size: 16.5px; text-decoration: none; position: relative; }
.sidebar nav a:hover, .sb-toggle:hover { background: var(--sb-hover); color: #fff; text-decoration: none; }
.sidebar nav a.on { background: #2b3136; color: #fff; }
.sidebar nav a.on::before { content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--accent); }
.badge { background: #5c2e04; color: #16191c; border-radius: 3px; padding: 0 7px; font-size: 14px; font-weight: 700; margin-left: auto; }
.sb-collapsed .sidebar nav .badge { position: absolute; top: 3px; right: 5px; margin: 0; padding: 0 5px; font-size: 12px; }

.sb-new { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 8px 6px; padding: 11px 12px; border-radius: 3px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 17px; }
.sb-new:hover { filter: brightness(1.1); text-decoration: none; color: #fff; }
.sb-new.on { box-shadow: inset 3px 0 0 #0f5c4d; }
.sb-collapsed .sb-new { padding: 11px 0; gap: 0; }
.sb-group { font-size: 13.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a9097; padding: 14px 12px 4px; }
.sidebar nav .sb-group:first-child { padding-top: 4px; }
.sb-collapsed .sidebar .sb-group { opacity: 1; width: auto; height: 1px; padding: 0; margin: 8px 10px; background: #2b3136; font-size: 0; }
.sb-bottom { padding: 8px; border-top: 1px solid #2b3136; display: flex; flex-direction: column; gap: 4px; }
.sb-toggle { background: none; border: 0; font: inherit; cursor: pointer; width: 100%; font-size: 15.5px; color: #8a9097; }
.sb-collapsed .sb-toggle .ico { transform: scaleX(-1); }

/* account row + menu (like a profile menu) */
.account { position: relative; }
.account summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 3px; color: #eef0ec; }
.account summary::-webkit-details-marker { display: none; }
.account summary:hover, .account[open] summary { background: var(--sb-hover); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #4a5158; color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 14.5px; letter-spacing: .3px; flex: none; }
.account.on .avatar { background: var(--accent); }
.account .who { flex: 1; font-weight: 500; font-size: 16px; text-overflow: ellipsis; }
.account .chev { color: #8a9097; display: flex; }
.account[open] .chev .ico { transform: rotate(180deg); }
.menu { position: absolute; bottom: calc(100% + 8px); left: 0; width: 248px; background: #16191c; border: 1px solid #4a5158;
  border-radius: 3px; padding: 6px; box-shadow: none; color: #eef0ec; z-index: 60; }
.sb-collapsed .menu { left: calc(100% + 10px); bottom: 0; }
.menu-head { padding: 8px 10px 8px; color: #eef0ec; font-weight: 600; font-size: 15.5px; }
.menu-head small { display: block; color: #8a9097; font-weight: 400; font-size: 14.5px; }
.menu a, .menu button[role=menuitem] { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 3px;
  background: none; border: 0; color: #eef0ec; font: inherit; font-size: 16px; text-align: left; cursor: pointer; text-decoration: none; }
.menu a:hover, .menu button[role=menuitem]:hover { background: #4a5158; text-decoration: none; }
.menu .hint { margin-left: auto; color: #8a9097; font-size: 14px; }
.menu hr { border: 0; border-top: 1px solid #4a5158; margin: 6px 4px; }
.name-form { display: flex; gap: 6px; padding: 4px 10px 8px; }
.name-form[hidden] { display: none; }
.name-form input { flex: 1; min-width: 0; background: #16191c; border-color: #4a5158; color: #fff; }

@media (max-width: 560px) {
  :root:not(.sb-collapsed) .content { margin-left: var(--sb-wc); }  /* expanded sidebar overlays content on phones */
  :root:not(.sb-collapsed) .sidebar { box-shadow: none; }
}

/* availability */
.avail-row { margin: 6px 0 0 34px; }
.avail { display: inline-block; font-size: 14.5px; font-weight: 600; padding: 1px 8px; border-radius: 3px; }
.avail::before { content: "\25CF"; margin-right: 5px; font-size: 11px; vertical-align: 1px; }
.avail.ok { background: var(--ok); color: var(--ok-ink); }
.avail.partial { background: #f8e3c8; color: #5c2e04; }
.avail.out { background: var(--bad); color: var(--bad-ink); }
.avail.lead { background: var(--chip); color: #4a5158; }
tr.xref td { border-top: 0; padding-top: 0; }
@media (max-width: 560px) { .avail-row { margin-left: 0; } }

/* quote totals */
.totals { max-width: 420px; margin-left: auto; padding: 12px 16px; }
.totals .trow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; font-size: 16.5px; }
.totals .grand { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-size: 20px; font-weight: 700; }
.totals .inbox { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.totals input { width: 90px; text-align: right; padding: 4px 6px; }
.totals #tax_rate { width: 64px; }
.totals .taxamt { display: inline-block; min-width: 70px; text-align: right; }

/* per-status totals + table footer */
.tabs a { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.tabs a em { font-style: normal; font-size: 14px; color: var(--muted); font-weight: 500; }
.tabs a.on em { color: var(--ink); }
tfoot td { border-top: 2px solid var(--line); border-bottom: 0; background: #eef0ec; padding-top: 10px; padding-bottom: 10px; }
.tablewrap { overflow-x: auto; }
.content { overflow-x: clip; }  /* "clip", not "hidden": hidden would break the pinned request panel */
.listbar .searchbox { flex: 1 1 220px; justify-content: flex-end; }
.listbar .searchbox input { width: 100%; max-width: 280px; }
.tabs a i { font-style: normal; white-space: nowrap; }

/* ---------------------------------------------------------------- follow-ups page: large, plain, easy to read */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fu-page { max-width: 880px; font-size: 18px; }
.fu-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.fu-head h1 { font-size: 30px; margin-bottom: 8px; }
.fu-lead { font-size: 19px; line-height: 1.55; color: #2b3136; margin: 0; max-width: 560px; }
.fu-setting { display: flex; align-items: center; gap: 8px; background: #fbfbf9; border: 1px solid var(--line); border-radius: 3px;
  padding: 10px 14px; font-size: 17px; }
.fu-setting input { width: 64px; font-size: 18px; padding: 6px 8px; text-align: center; }
.fu-card { background: #fbfbf9; border: 1px solid #c9ccc4; border-radius: 3px; padding: 24px; margin-bottom: 22px;
  box-shadow: none; }
.fu-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.fu-who { display: flex; align-items: center; gap: 14px; }
.fu-initial { width: 48px; height: 48px; border-radius: 50%; background: #dce9e4; color: #0b4a3e; display: grid; place-items: center;
  font-size: 25px; font-weight: 700; flex: none; }
.fu-who h2 { font-size: 25px; margin: 0; }
.fu-company { font-size: 18px; color: #4a5158; margin-top: 2px; }
.fu-amount { text-align: right; }
.fu-money { font-size: 26px; font-weight: 700; }
.fu-sub { font-size: 17px; color: #4a5158; margin-top: 2px; }
.fu-sub a { font-weight: 600; }
.fu-wait { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0; }
.fu-wait-pill { background: #f8e3c8; color: #5c2e04; border: 1px solid #e0c29c; border-radius: 2px; padding: 6px 14px;
  font-size: 18px; font-weight: 700; }
.fu-wait-note { font-size: 17px; color: #4a5158; }
.letter { border: 1px solid #c9ccc4; border-radius: 3px; background: #fbfbf9; padding: 6px 18px 14px; }
.letter-row { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid #c9ccc4; font-size: 18px; color: #16191c; }
.letter-label { width: 72px; flex: none; color: #4a5158; font-weight: 600; }
.letter-body { display: block; width: 100%; border: 0; background: transparent; resize: vertical; margin-top: 12px; padding: 4px 0;
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif; color: #16191c; overflow: hidden; }
.letter-body:focus { outline: 2px solid #a9c9be; outline-offset: 4px; border-radius: 2px; }
.letter-hint { font-size: 16.5px; color: #4a5158; margin-top: 6px; }
.fu-actions { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.fu-send { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.big { font-size: 18px; padding: 11px 20px; border-radius: 3px; font-weight: 600; }
.btn.mailbig { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.mailbig:hover { background: #0b4a3e; }
.fu-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid #c9ccc4; font-size: 17px; }
.fu-status > span { color: #4a5158; font-weight: 600; margin-right: 4px; }
.fu-status form { display: inline; }
.fu-status .btn { font-size: 17px; padding: 8px 14px; }
.fu-status .btn.won { background: var(--ok); border-color: #a9c9be; color: var(--ok-ink); }
.fu-status .btn.lost { color: var(--bad-ink); }
.fu-empty { background: #fbfbf9; border: 1px solid var(--line); border-radius: 3px; padding: 40px 24px; text-align: center; }
.fu-empty-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--ok); color: var(--ok-ink); display: grid;
  place-items: center; font-size: 30px; margin: 0 auto 12px; }
.fu-empty h2 { font-size: 25px; margin-bottom: 6px; }
.fu-empty p { font-size: 18px; color: #4a5158; margin: 0; }
/* full width: customer + buttons on the left, the email on the right */
main { max-width: 1760px; }
.fu-page { max-width: none; }
.fu-head .fu-lead { max-width: 720px; }
.fu-card { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 28px; align-items: start; }
.fu-side { display: flex; flex-direction: column; gap: 18px; }
.fu-side .fu-amount { text-align: left; }
.fu-side .fu-wait { flex-direction: column; align-items: flex-start; gap: 6px; margin: 0; }
.fu-side .fu-actions { margin-top: 4px; }
.fu-side .fu-send { flex-direction: column; }
.fu-side .fu-send .btn { width: 100%; text-align: center; }
.fu-card .letter { margin: 0; }
.fu-side .fu-status { flex-wrap: nowrap; }
.fu-side .fu-status > span { white-space: nowrap; }
.fu-side .fu-status form { flex: 1 1 0; min-width: 0; }
.fu-side .fu-status .btn { width: 100%; padding: 8px 6px; text-align: center; white-space: nowrap; }
@media (max-width: 1000px) {
  .fu-card { grid-template-columns: 1fr; }
  .fu-side .fu-send { flex-direction: row; }
  .fu-side .fu-send .btn { width: auto; }
}
@media (max-width: 560px) {
  .fu-card { padding: 18px; }
  .fu-side .fu-send .btn { flex: 1 1 100%; }
}

/* ---------------------------------------------------------------- quote review: request <-> line link, routine notes */
.src-hint { font-size: 14.5px; color: var(--muted); margin: -4px 0 10px; }
#src .src-line { display: block; padding: 1px 6px; margin: 0 -6px; border-radius: 2px; transition: background .2s; }
#src .src-line.linked { cursor: pointer; }
#src .src-line.linked:hover { background: #eef0ec; }
#src .src-line.hit { background: #f8e3c8; box-shadow: inset 3px 0 0 #5c2e04; color: #16191c; font-weight: 600; }
.card.sel { outline: 2px solid var(--accent); outline-offset: 2px; }
.card:focus { outline: none; }
.card:focus.sel { outline: 2px solid var(--accent); }
.avail-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.qtynote { display: inline-block; font-size: 14.5px; color: #2b3136; background: #dce9e4; border: 1px solid #a9c9be;
  padding: 1px 8px; border-radius: 3px; }

/* always-visible bottom bar on a quote */
.approvebar { position: fixed; bottom: 0; right: 0; left: var(--sb-w); z-index: 30; display: flex; align-items: center; gap: 18px;
  padding: 12px 28px; background: #fbfbf9; border-top: 1px solid var(--line); box-shadow: none;
  transition: left .18s ease; }
.sb-collapsed .approvebar { left: var(--sb-wc); }
.approvebar .ab-total span { display: block; font-size: 13.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.approvebar .ab-total b { font-size: 25px; }
.approvebar .ab-left { font: inherit; font-size: 17px; font-weight: 700; color: #5c2e04; background: #f8e3c8; border: 1px solid #e0c29c;
  border-radius: 2px; padding: 8px 16px; cursor: pointer; }
.approvebar .ab-left span { font-weight: 500; margin-left: 6px; text-decoration: underline; }
.approvebar .ab-left:hover { background: #f2d3ad; }
.approvebar .ab-done { font-size: 17px; font-weight: 600; color: var(--ok-ink); }
.approvebar .ab-spacer { flex: 1; }
.approvebar form { margin: 0; }
.approvebar .mailpick { margin-left: -8px; white-space: nowrap; }
.approvebar .mailpick select { min-height: 0; padding: 2px 6px; font-size: 15px; width: auto; }
main:has(.approvebar) { padding-bottom: 110px; }
@media (max-width: 560px) {
  :root:not(.sb-collapsed) .approvebar { left: var(--sb-wc); }
  .approvebar { gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
}

/* ---------------------------------------------------------------- sign in / setup / password */
body.authpage { background: linear-gradient(160deg, #16191c 0%, #2b3136 45%, #f1f2ee 45.1%); min-height: 100vh; }
.authwrap { max-width: 440px; margin: 0 auto; padding: 56px 20px 40px; }
.authbrand { display: flex; align-items: center; gap: 12px; color: #fff; margin-bottom: 22px; }
.authbrand .logo { background: #fbfbf9; border-radius: 3px; height: 44px; min-width: 44px; padding: 4px 6px; display: grid; place-items: center; }
.authbrand .logo img { max-height: 36px; max-width: 150px; display: block; }
.authbrand .logo.mark { background: var(--accent); color: #fff; font-weight: 700; font-size: 22px; width: 44px; }
.authbrand b { display: block; font-size: 20px; }
.authbrand small { color: #8a9097; font-size: 13.5px; letter-spacing: .5px; text-transform: uppercase; }
.authcard { background: #fbfbf9; border-radius: 3px; padding: 28px; box-shadow: none; }
.authcard h1 { font-size: 26px; margin-bottom: 6px; }
.authlead { color: #4a5158; font-size: 17px; margin: 0 0 20px; line-height: 1.5; }
.authform { display: grid; gap: 14px; }
.authform label { display: grid; gap: 6px; font-size: 16.5px; font-weight: 600; color: #2b3136; }
.authform label .hint { font-weight: 400; color: var(--muted); font-size: 14.5px; }
.authform input { font-size: 18px; padding: 10px 12px; border-radius: 3px; width: 100%; }
:where(input[type=password]) { font: inherit; border: 1px solid #8a9097; border-radius: 3px; padding: 9px 11px; min-height: 44px; background: #fbfbf9; }
.authform .btn.big { margin-top: 6px; width: 100%; padding: 12px; font-size: 18px; }
.authfoot { text-align: center; color: var(--muted); font-size: 15.5px; margin-top: 18px; }

/* ---------------------------------------------------------------- settings: account, team, feed */
.acct { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.acct > div span { display: block; }
.acct > div b { font-size: 17px; }
.acct .btn { margin-left: auto; }
#team tr.inactive td { opacity: .55; }
.team-actions { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
.team-actions form { display: inline; }
.team-actions details.reset { position: relative; }
.team-actions details.reset summary { list-style: none; }
.team-actions details.reset summary::-webkit-details-marker { display: none; }
.team-actions details.reset form { position: absolute; right: 0; top: 30px; z-index: 10; background: #fbfbf9; border: 1px solid var(--line);
  border-radius: 3px; padding: 10px; display: flex; gap: 6px; box-shadow: none; width: 300px; }
.team-actions details.reset input { flex: 1; min-width: 0; }
.btn.lostbtn { color: var(--bad-ink); }
.addperson { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.addperson input[type=text], .addperson input[type=email] { flex: 1 1 160px; }
.feedform { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.feedform label { display: grid; gap: 4px; font-size: 15.5px; font-weight: 600; color: #2b3136; }
.feedform label:first-child { flex: 1 1 380px; }
.feedform input { width: 100%; }
.runs td { font-size: 15.5px; padding: 6px 8px; }

/* ---------------------------------------------------------------- pricing: source, margin, minimum */
.pricesrc { display: inline-block; margin-top: 3px; font-size: 13.5px; font-weight: 600; color: #4a5158; background: var(--chip);
  border-radius: 3px; padding: 0 6px; white-space: nowrap; }
.pricesrc.contract { background: #eef0ec; color: #2b3136; }
.pricesrc.break { background: #dce9e4; color: #0b4a3e; }
s.listp { color: #8a9097; margin-right: 3px; }
.margin-row { margin: 6px 0 0 34px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.margin { font-size: 14.5px; color: #4a5158; }
.margin.low { color: var(--bad-ink); font-weight: 700; }
.floor-ok { font-size: 14.5px; color: var(--ok-ink); }
.floor-form { display: flex; gap: 6px; flex: 1 1 380px; }
.floor-form input { flex: 1; font-size: 15px; padding: 4px 8px; }
.card.floorflag { background: #f6deda; border-color: #e3b1a9; box-shadow: inset 4px 0 0 #8a1c13; }
.custlink { background: #eef0ec; color: #2b3136; text-decoration: none; }
.custlink:hover { text-decoration: none; background: #eef0ec; }
.custedit select { width: 100%; }
.floors { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.floors label { display: grid; gap: 4px; font-size: 15.5px; font-weight: 600; color: #2b3136; }
.floors .inbox { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.floors input { width: 80px; text-align: right; }
@media (max-width: 560px) { .margin-row { margin-left: 0; } }

/* ---------------------------------------------------------------- saved corrections, price changes */
.pill.learned { background: #dce9e4; color: var(--ok-ink); font-weight: 700; }
.pricesrc.learned { background: #dce9e4; color: var(--ok-ink); cursor: help; }
.pricesrc.manual { background: #f8e3c8; color: #5c2e04; cursor: help; }
.pricechange { position: relative; }
.pricechange summary { list-style: none; }
.pricechange summary::-webkit-details-marker { display: none; }
.pricechange form { position: absolute; right: 0; bottom: 34px; z-index: 25; width: 320px; background: #fbfbf9; border: 1px solid var(--line);
  border-radius: 3px; padding: 14px; box-shadow: none; display: grid; gap: 10px; }
.pricechange label { display: grid; gap: 4px; font-size: 14.5px; font-weight: 600; color: #2b3136; }
.pricechange label.chk { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.pricechange input[type=text] { width: 100%; }
.card .money .pricesrc { white-space: normal; max-width: 112px; margin-left: auto; text-align: center; line-height: 1.3; padding: 1px 6px; }
.card .money { display: flex; flex-direction: column; align-items: flex-end; }
.subs { margin: 8px 0 0 34px; border: 1px solid #a9c9be; background: #eef0ec; border-radius: 3px; padding: 8px 10px; }
.subs-head { font-size: 13.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: #0b4a3e; margin-bottom: 4px; }
.sub-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid #dce9e4; }
.sub-row:first-of-type { border-top: 0; }

/* ---------------------------------------------------------------- results dashboard */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { background: #fbfbf9; border: 1px solid var(--line); border-radius: 3px; padding: 14px 16px; }
.kpi span { display: block; font-size: 14.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.kpi b { display: block; font-size: 30px; margin: 4px 0 2px; color: #16191c; }
.kpi small { color: #4a5158; font-size: 15px; }
.kpi.hero { border-color: #a9c9be; background: #eef0ec; }
.small-kpis .kpi b { font-size: 22px; }
.chartpanel svg.bars { width: 100%; height: auto; display: block; margin-top: 10px; }
.bars .grid { stroke: #c9ccc4; stroke-width: 1; }
.bars .base { stroke: #8a9097; stroke-width: 1; }
.bars .axis { font-size: 13.5px; fill: #4a5158; }
.bars .val { font-size: 13.5px; fill: #16191c; font-weight: 600; }
.bars .hit { fill: transparent; }
.bars .s1 .mark { fill: #8a9097; }
.bars .s2 .mark { fill: #0f5c4d; }
.bars .bar:hover .hit { fill: rgba(16,24,40,.04); }
.legend { display: flex; gap: 14px; font-size: 15px; color: #4a5158; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend .s1 { background: #8a9097; } .legend .s2 { background: #0f5c4d; }
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: 140px 1fr 32px; align-items: center; gap: 10px; font-size: 15.5px; }
.hbar .track { background: #eef0ec; border-radius: 2px; height: 12px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: #0f5c4d; border-radius: 0; }
.hbar b { text-align: right; }
.lostpick { position: relative; display: inline-block; }
.lostpick summary { list-style: none; }
.lostpick summary::-webkit-details-marker { display: none; }
.lostpick form { position: absolute; z-index: 30; right: 0; top: 40px; background: #fbfbf9; border: 1px solid var(--line); border-radius: 3px;
  padding: 12px 14px; box-shadow: none; display: grid; gap: 6px; width: 220px; font-size: 16.5px; }
.lostpick label { display: flex; gap: 8px; align-items: center; }
.importgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.importcard { display: flex; flex-direction: column; }
.importcard .filepick { margin-top: auto; }
ul.problems { margin: 6px 0 0; padding-left: 18px; color: #5c2e04; }
@media (max-width: 1000px) { .kpis, .importgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .kpis, .importgrid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- cohesion pass */
/* outcome buttons look the same everywhere */
.btn.won { background: var(--ok); border-color: #a9c9be; color: var(--ok-ink); }
.btn.lost, .btn.lostbtn { color: var(--bad-ink); }
.lostpick > summary.btn { display: inline-block; border: 1px solid var(--line); background: #fbfbf9; cursor: pointer; }
.fu-side .fu-status .lostpick { flex: 1 1 0; }
.fu-side .fu-status .lostpick > summary.btn { display: block; width: 100%; padding: 8px 6px; text-align: center; }
/* original request: emails read like text; spreadsheets keep their columns */
#src.prose { font-family: inherit; font-size: 16px; line-height: 1.5; white-space: pre-wrap; }
#src.tabular { font-size: 15px; }
/* two inputs side by side */
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.twocol input { width: 100%; }
@media (max-width: 560px) { .twocol { grid-template-columns: 1fr; } }
/* page headers: same rhythm on every page */
main > h1, main > .toolbar h1 { margin-top: 0; }
.sub { max-width: 860px; }

/* ---------------------------------------------------------------- easier to read and click (larger text, more space between buttons) */
textarea { line-height: 1.5; }
.emailstatus { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.emailstatus form { margin-left: auto; }
.pdfgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-bottom: 14px; }
.pdfgrid label { display: grid; gap: 6px; align-content: start; font-weight: 600; color: #2b3136; }
.pdfgrid textarea, .pdfgrid input { font-weight: 400; }
.pdfgrid label .hint { font-weight: 400; color: var(--muted); font-size: 14.5px; }
.pdfgrid .wide { grid-column: 1 / -1; }
.pdfgrid textarea, .pdfgrid input { width: 100%; }
.pdfcontact { display: grid; gap: 10px; }
.pdfbtns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 760px) { .pdfgrid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- settings: one tab per job, labels above every box */
.setwrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }
.settabs { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 16px; }
.settabs a { display: block; padding: 12px 14px; border-radius: 3px; color: var(--ink); border: 1px solid transparent; }
.settabs a b { display: block; font-size: 17px; }
.settabs a small { display: block; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.settabs a:hover { background: #fbfbf9; border-color: var(--line); text-decoration: none; }
.settabs a.on { background: #fbfbf9; border-color: var(--line); box-shadow: inset 4px 0 0 var(--accent); }
.setbody { max-width: 860px; }
.setbody .panel { padding: 24px; }
.setbody h2 { font-size: 22px; margin-bottom: 6px; }
.setbody .lead { color: #2b3136; margin: 0 0 20px; }
.setbody .hint { font-weight: 400; color: var(--muted); font-size: 15px; }
.setbody h3.step { font-size: 18px; margin: 26px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.setbody h3.step:first-of-type { border-top: 0; padding-top: 0; margin-top: 6px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; align-content: start; }
.field label { font-weight: 600; color: #2b3136; }
.field input, .field select, .field textarea { width: 100%; font-size: 17px; }
.twofields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.logorow { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.logorow .logo-preview { min-width: 160px; min-height: 80px; display: flex; align-items: center; justify-content: center; }
.savebar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.quietform { margin: -6px 0 18px; }
.facts { display: grid; gap: 14px; margin: 0 0 22px; }
.facts div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.facts dd .muted { font-weight: 400; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; }
.people li.inactive { opacity: .6; }
.people .avatar { width: 42px; height: 42px; border-radius: 50%; background: #dce9e4; color: var(--accent); display: grid; place-items: center; font-weight: 700; flex: none; }
.people .who { flex: 1; min-width: 0; }
.people .who .muted { font-size: 15px; margin-top: 2px; }
.personmenu { position: relative; }
.personmenu summary { list-style: none; }
.personmenu summary::-webkit-details-marker { display: none; }
.personbox { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 320px; background: #fbfbf9; border: 1px solid var(--line);
  border-radius: 3px; box-shadow: none; padding: 14px; display: grid; gap: 12px; }
.personbox .btn { width: 100%; }
.resetform { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.resetform label { display: grid; gap: 6px; font-weight: 600; color: #2b3136; }
.intgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.intcard { border: 1px solid var(--line); border-radius: 3px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.inthead { display: flex; align-items: center; gap: 12px; }
.inthead b { font-size: 19px; }
.inthead .pill { margin-left: auto; }
.intlogo { width: 46px; height: 46px; border-radius: 3px; color: #fff; font-weight: 800; font-size: 22px; display: grid; place-items: center; flex: none; }
.intlist { margin: 0; padding-left: 20px; color: #2b3136; display: grid; gap: 4px; }
.intconnect summary { list-style: none; text-align: center; }
.intconnect summary::-webkit-details-marker { display: none; }
.intconnect .btn.big { width: 100%; padding: 13px; font-size: 17px; }
.intsoon { margin-top: 12px; background: #dce9e4; border: 1px solid #a9c9be; border-radius: 3px; padding: 12px 14px; color: #2b3136; }
@media (max-width: 900px) {
  .setwrap { grid-template-columns: 1fr; }
  .settabs { position: static; flex-direction: row; flex-wrap: wrap; }
  .settabs a { padding: 10px 12px; }
  .settabs a small { display: none; }
  .twofields, .intgrid { grid-template-columns: 1fr; }
}
.erpcols { margin-bottom: 8px; }
.erpcols td { vertical-align: middle; padding: 6px 10px; }
.erpcols td:first-child { width: 260px; }
.erpcols input { width: 100%; }
.srcphoto { display: block; margin: 4px 0 10px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: #eef0ec; }
.srcphoto img { display: block; width: 100%; max-height: 420px; object-fit: contain; }

/* ---------------------------------------------------------------- supplier price increases */
.kpi.bad b { color: var(--bad-ink); }
.steps { margin: 0 0 18px; padding-left: 22px; display: grid; gap: 8px; }
.tablewrap { overflow-x: auto; }
.costrows td { vertical-align: top; }
.costrows td:first-child { width: 56px; text-align: center; }
.costrows input[type=checkbox] { width: 22px; height: 22px; margin-top: 4px; }
.costrows .rawcell { max-width: 380px; }
.costrows .skuin { width: 170px; }
.costrows .costin { width: 90px; text-align: right; }
.costrows tr.look td { background: var(--flag); }
.costrows tr.look td:first-child { box-shadow: inset 4px 0 0 var(--flag-edge); }
.costrows tr.off td { color: var(--muted); }
.flagnote { color: #5c2e04; font-weight: 600; margin-top: 4px; }
.bad-ink { color: var(--bad-ink); }
.costquotes tr.under td:first-child { box-shadow: inset 4px 0 0 var(--bad-ink); }
.toolbtns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.toolbtns form { margin: 0; }
.pill.exported { background: #dce9e4; color: #0f5c4d; }
form.inline { display: inline; margin: 0; }
.linkbtn { background: none; border: 0; padding: 0 2px; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }
.ab-why { font-size: 15px; color: #5c2e04; max-width: 420px; }

/* required fields: a red asterisk, explained once per form */
.req { color: #8a1c13; font-weight: 700; margin-left: 3px; }
input + .req, .req + input, .req + select { margin-right: 3px; }
.reqnote { margin: 10px 0 0; font-size: 14.5px; color: var(--muted); font-style: italic; }
.reqnote .req { margin: 0; font-style: normal; }
.reqlabel .hint { font-weight: 400; }
.addperson .reqnote, .filepick .reqnote { flex-basis: 100%; margin-top: 2px; }

/* ---------------------------------------------------------------- line cards: three actions, the rest under More */
.card-actions { align-items: flex-start; }
.card-actions .btn { min-height: 40px; }
.partpick summary, .more summary { list-style: none; cursor: pointer; }
.partpick summary::-webkit-details-marker, .more summary::-webkit-details-marker, .pricechange summary::-webkit-details-marker { display: none; }
.partpick[open] { flex-basis: 100%; }
.partpick[open] > summary { margin-bottom: 8px; }
.partbox { border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px; background: #fbfbf9; display: grid; gap: 6px; }
.alt-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.alt-row .mono { margin-right: 4px; }
.alt-type .skuin { width: 100%; max-width: 320px; }
.more { position: relative; }
.morebox { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; background: #fbfbf9; border: 1px solid var(--line); border-radius: 3px;
  box-shadow: none; padding: 12px 14px; display: grid; gap: 10px; min-width: 260px; }
.morebox form { margin: 0; }
.morebox .pricechange form { position: static; box-shadow: none; border: 0; padding: 8px 0 0; width: auto; }
.linkbtn.danger { color: var(--bad-ink); }
.picked { margin: 4px 0 0 34px; }

/* ---------------------------------------------------------------- approved quote: one button to send */
.sendpanel h2 { font-size: 21px; }
.sendrow { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 6px 0 4px; }
.sendrow .btn.big { padding: 14px 26px; font-size: 18px; }
.mapmore { margin: 4px 0 16px; }
.mapmore > summary { cursor: pointer; }
.sendrow select { min-height: 0; padding: 2px 6px; font-size: 15px; }
.sendmore { margin-top: 14px; }
.sendmore summary { list-style: none; }
.sendlinks { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.sendlinks form { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }
.fu-is-done > :not(.fu-done) { opacity: .45; }
.fu-done { margin-bottom: 12px; }
.newwrap { max-width: 860px; display: grid; gap: 18px; }
.samples summary { cursor: pointer; }
.samples[open] summary { margin-bottom: 10px; }
.card-actions .partbox form.alt-row { display: flex; }
.card-actions .partbox form.alt-type { display: block; }
.card-actions .alt-row .btn { flex: none; }

/* ---- quote page, one column: one big question per line, plain choices, nothing hidden behind menus */
.review.one { display: block; max-width: 1000px; }
.review.one .source { position: static; max-height: 380px; margin-bottom: 14px; padding: 12px 16px; }
.review.one .source > summary { font-size: 17px; }
.review.one .source[open] > summary { margin-bottom: 10px; }
.review.one .card { padding: 16px 18px; }
.review.one .card .mono { font-size: 16.5px; }
.review.one .card .asked { font-size: 16px; }
.review.one .card .desc { font-size: 17px; }
.review.one .card .qty input { font-size: 18px; width: 84px; }
.review.one .card .money b { font-size: 18px; }
.review.one .card .small { font-size: 15px; }
.question { font-size: 20px; font-weight: 700; color: #5c2e04; margin: 0 0 10px; line-height: 1.35; }
.card.floorflag .question { color: #8a1c13; }
.card .qty input.needqty { border: 2px solid var(--flag-edge); background: #fbfbf9; box-shadow: 0 0 0 3px #f2d3ad; }
.review.one .flagwhy { font-weight: 500; font-size: 16px; color: #5c2e04; margin-left: 34px; }
.review.one .picked { margin: 6px 0 0 34px; font-size: 16px; color: #4a5158; }
.review.one .card-actions { gap: 12px; }
.review.one .card-actions .linkbtn { font-size: 16px; }
.partpick[open] > summary { margin-bottom: 8px; }
.partbox-end { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.charges-box > summary { margin: 4px 0 6px; font-size: 16px; }



/* ================================================================ the PriceHand website's look
   Off-white surfaces, near-black ink, one green accent, square corners, thin dark rules, no shadows.
   Headings in Barlow Semi Condensed; labels, tags, part numbers and prices in IBM Plex Mono. */
:root { --head: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif; --monof: 'IBM Plex Mono', ui-monospace, monospace;
        --rule: #16191c; --surface: #fbfbf9; --sub: #2b3136; }
h1, h2, h3, .question, .kpi b, .brand .label, .authbrand, .fu-money, .totals .grand, .listtitle { font-family: var(--head); }
h1 { font-size: 34px; font-weight: 700; line-height: 1.08; letter-spacing: .005em; }
h2 { font-size: 23px; font-weight: 600; line-height: 1.15; }
h3 { font-size: 20px; font-weight: 600; }
.question { font-size: 24px; font-weight: 700; line-height: 1.15; color: #16191c; }
.card.floorflag .question { color: #8a1c13; }
.sub, .lead { color: var(--sub); }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
.sidebar a, .btn, .sb-new, .brand, .tabs a, .menu a, a.btn { text-decoration: none; }
.mono, code, .sku, td.mono { font-family: var(--monof); }
.money b, .totals .trow b, .totals .grand span, td.num { font-family: var(--monof); font-weight: 500; }

/* panels and cards: off-white with a thin dark rule */
.panel, .card, .kpi, .stat, .fu-card, .intcard, .importcard { background: var(--surface); border: 1px solid var(--rule); border-radius: 3px; box-shadow: none; }
.card.flagged { background: var(--flag); border-color: var(--rule); box-shadow: inset 4px 0 0 var(--flag-edge); }
.card.floorflag { background: #f6deda; border-color: var(--rule); box-shadow: inset 4px 0 0 #8a1c13; }
.card.sel { outline: 3px solid var(--accent); outline-offset: 2px; }
th, td { border-bottom: 1px solid var(--line); }
th { font-family: var(--monof); font-size: 12.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
tr.click:hover { background: #eef0ec; }

/* buttons: 44px tall, square corners; primary is the green accent, the rest are outlined in ink */
.btn { background: transparent; border: 1px solid var(--rule); border-radius: 3px; color: var(--ink); font-weight: 600; min-height: 44px; padding: 10px 20px; }
.btn:hover { background: #eef0ec; }
.btn.primary, .btn.mailbig { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover, .btn.mailbig:hover { background: #0b4a3e; border-color: #0b4a3e; }
.btn.ok { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ok:hover { background: #0b4a3e; }
.btn.big { font-size: 18px; padding: 12px 26px; min-height: 52px; border-radius: 3px; }
.btn.small { min-height: 36px; padding: 6px 12px; }
.btn.ghost { border-color: transparent; }
.linkbtn { color: var(--ink); text-underline-offset: 2px; }
.linkbtn.danger, .lostbtn { color: #8a1c13; }

/* inputs: 1px grey rule on off-white, a heavy ink focus ring */
input[type=text], input[type=number], input[type=email], input[type=search], input[type=password], select, textarea {
  border: 1px solid #8a9097; border-radius: 3px; background-color: var(--surface); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--rule); outline-offset: 2px; border-color: var(--rule); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--rule); outline-offset: 2px; }
.filepick { border: 1px dashed #8a9097; border-radius: 3px; background: #eef0ec; }
input[type=file]::file-selector-button { border: 1px solid var(--rule); border-radius: 3px; background: var(--surface); font-weight: 600; }

/* status tags: the website's chips — mono, uppercase, square, outlined or solid */
.pill { display: inline-flex; align-items: center; border: 1px solid var(--rule); border-radius: 2px; background: transparent; color: var(--ink);
        font-family: var(--monof); font-size: 12.5px; font-weight: 500; letter-spacing: .04em; line-height: 1; text-transform: uppercase;
        padding: 6px 8px; white-space: nowrap; }
.pill.draft { background: var(--rule); color: var(--surface); }
.pill.approved { border-color: var(--accent); color: var(--accent); background: transparent; }
.pill.sent, .pill.won { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill.replied { background: transparent; color: var(--ink); }
.pill.lost { background: transparent; border-color: #8a9097; color: #8a1c13; }
.pill.sample { border: 1px dashed #8a9097; color: var(--muted); background: transparent; }
.pill.exported { border-color: #8a9097; color: var(--muted); background: transparent; }
.pill.high { border-color: var(--accent); color: var(--accent); background: transparent; }
.pill.medium, .pill.low { background: var(--flag); border-color: var(--flag-edge); color: var(--flag-edge); }
.badge { background: var(--flag); color: var(--flag-edge); border-radius: 2px; font-family: var(--monof); font-size: 13px; font-weight: 500; padding: 1px 6px; }

/* messages: green note, amber warning, red error — flat, square */
.msg { background: #dce9e4; color: var(--accent); border: 1px solid var(--accent); border-radius: 3px; }
.err { background: #f6deda; color: #8a1c13; border: 1px solid #8a1c13; border-radius: 3px; }
.banner { background: var(--flag); color: var(--flag-edge); border-bottom: 1px solid var(--rule); }
.summary { border-radius: 3px; }
.summary.warn { background: var(--flag); border: 1px solid var(--flag-edge); color: var(--flag-edge); }
.summary.good { background: #dce9e4; border: 1px solid var(--accent); color: var(--accent); }

/* small mono labels, like the website's section labels */
.kpi span, .sb-group, .letter-label { font-family: var(--monof); font-size: 12.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.kpi b { font-weight: 700; font-size: 34px; }

/* sidebar and the bottom bar use the website's footer colors */
.sidebar { background: #16191c; border-right: 1px solid #4a5158; }
.brand .label { font-size: 22px; font-weight: 700; letter-spacing: .01em; }
.brand .logo.mark { border-radius: 3px; font-family: var(--head); }
.sb-new { border-radius: 3px; font-weight: 600; }
.sidebar nav a { border-radius: 3px; }
.sidebar nav a.on { background: #2b3136; box-shadow: inset 3px 0 0 var(--accent); }
.approvebar { background: var(--surface); border-top: 1px solid var(--rule); box-shadow: none; }
.approvebar .ab-left { background: var(--flag); border: 1px solid var(--flag-edge); color: var(--flag-edge); border-radius: 3px; }
.approvebar .ab-total span { font-family: var(--monof); font-size: 12.5px; letter-spacing: .06em; }
.approvebar .ab-total b { font-family: var(--monof); font-weight: 500; }

/* tabs on the Quotes list: square, ruled */
.tabs a { border-radius: 3px; }
.tabs a.on { background: var(--surface); border-color: var(--rule); }

/* dropdown panels (customer edit, menus): a dark rule instead of a shadow */
.custedit form, .partbox, .morebox, .personbox, .pricechange form, .lostpick form { border: 1px solid var(--rule); border-radius: 3px; box-shadow: none; background: var(--surface); }
.avail { font-family: var(--monof); font-size: 13px; letter-spacing: .02em; border-radius: 2px; }
.qtynote { border-radius: 2px; background: #eef0ec; border-color: #c9ccc4; }
.flagwhy { color: var(--flag-edge); }
.pricesrc { font-family: var(--monof); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; border-radius: 2px; }

/* sign-in pages: flat, like the website — an ink rule under the brand, a ruled card */
body.authpage { background: #f1f2ee; border-top: 6px solid #16191c; }
.authbrand { color: #16191c; padding-bottom: 14px; border-bottom: 1px solid #16191c; }
.authbrand b { font-family: var(--head); font-size: 26px; font-weight: 700; }
.authbrand small { color: #4a5158; font-family: var(--monof); font-size: 12px; letter-spacing: .06em; }
.authcard { border: 1px solid #16191c; }
.authcard h1 { font-size: 32px; }
.authfoot { color: #4a5158; }
.settabs a, .fu-sub a.btn, .custlink, .pill a { text-decoration: none; }
.settabs a.on { box-shadow: inset 3px 0 0 var(--accent); }
