/* OS&M Orders — front-end styles
   Matches the OS&M Daily Dashboard: purple wordmark with lime ampersand,
   grey script headline over a yellow rule, Roboto Slab section heads,
   big rounded colored tiles with a white panel inside. */

:root {
	--osm-purple: #6a1b9a;
	--osm-lime:   #c8d400;
	--osm-yellow: #ffd54f;
	--osm-coral:  #f07c7c;
	--osm-green:  #3e8e5b;
	--osm-blue:   #3d7ab8;
	--osm-grey:   #9e9e9e;
	--osm-ink:    #2b2b2b;
	--osm-muted:  #6f6f6f;
	--osm-paper:  #ffffff;
	--osm-panel:  #f4f4f4;
	--osm-line:   #e6e6e6;

	--serif: "Roboto Slab", Georgia, serif;
	--sans:  "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--script: "Lobster", "Brush Script MT", cursive;

	--w: 960px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.osm {
	margin: 0;
	background: var(--osm-paper);
	color: var(--osm-ink);
	font: 16px/1.55 var(--sans);
}
a { color: var(--osm-purple); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--osm-yellow); outline-offset: 2px; }

/* ---------- Nav ---------- */
.osm-nav {
	max-width: var(--w);
	margin: 0 auto;
	padding: 22px 24px 8px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}
.osm-nav__brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.osm-nav__logo { height: 44px; width: auto; display: block; }
.osm-nav__wordmark {
	font: 900 34px/1 var(--sans);
	letter-spacing: -1px;
	color: var(--osm-purple);
}
.osm-nav__wordmark span { color: var(--osm-lime); }
.osm-nav__site { font: 400 20px var(--serif); color: var(--osm-grey); }
.osm-nav__links { display: flex; gap: 22px; }
.osm-nav__links a {
	font: 700 15px var(--sans);
	color: var(--osm-grey);
	text-decoration: none;
	padding-bottom: 6px;
	border-bottom: 4px solid transparent;
}
.osm-nav__links a.is-active { border-bottom-color: var(--osm-yellow); }
.osm-nav__links a:hover { color: var(--osm-ink); }

/* ---------- Layout ---------- */
.osm-main { max-width: var(--w); margin: 0 auto; padding: 0 24px 64px; }
.osm-foot {
	max-width: var(--w);
	margin: 0 auto;
	padding: 24px;
	display: flex;
	justify-content: space-between;
	color: var(--osm-muted);
	font-size: 13px;
	border-top: 1px solid var(--osm-line);
}

/* ---------- Hero: script title over the yellow rule ---------- */
.osm-hero { text-align: center; padding: 40px 0 18px; }
.osm-script {
	font: 400 clamp(48px, 9vw, 84px)/1.05 var(--script);
	color: var(--osm-grey);
	margin: 0 0 28px;
	letter-spacing: 0.5px;
}
.osm-rule { height: 10px; background: var(--osm-yellow); border-radius: 2px; }

/* ---------- Tiles: white panel inside a colored rounded block ---------- */
.osm-tiles {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
	margin: 36px 0 8px;
}
.osm-tile {
	display: block;
	text-decoration: none;
	border-radius: 24px;
	padding: 10px 10px 0;
	background: var(--c, var(--osm-purple));
	color: #fff;
}
.osm-tile--coral  { --c: var(--osm-coral); }
.osm-tile--purple { --c: var(--osm-purple); }
.osm-tile--green  { --c: var(--osm-green); }
.osm-tile--yellow { --c: var(--osm-yellow); color: var(--osm-ink); }
.osm-tile__panel {
	background: #fff;
	border-radius: 16px 16px 0 0;
	padding: 26px 18px 18px;
	font: 700 44px/1 var(--serif);
	color: var(--osm-ink);
	text-align: center;
}
.osm-tile__panel--money { font-size: 30px; padding-top: 32px; padding-bottom: 24px; }
.osm-tile__label {
	font: 700 17px var(--serif);
	text-align: center;
	padding: 14px 12px 16px;
}
a.osm-tile:hover .osm-tile__panel { background: #fffdf3; }

/* ---------- Sections ---------- */
.osm-section { margin-top: 44px; }
.osm-section h2 {
	font: 700 26px var(--serif);
	margin: 0 0 14px;
}
.osm-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.osm-empty { color: var(--osm-muted); margin: 6px 0 0; }
.osm-note { color: var(--osm-muted); font-size: 14px; margin: 12px 0 0; }
.osm-prov { color: var(--osm-coral); font-weight: 700; }

.osm-btn {
	display: inline-block;
	text-align: center;
	line-height: 1.25;
	background: var(--osm-purple);
	color: #fff;
	text-decoration: none;
	font: 700 15px var(--sans);
	padding: 10px 18px;
	border-radius: 999px;
}
.osm-btn:hover { background: #55157c; }

/* ---------- Commission figures ---------- */
.osm-figures {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
	margin: 0;
}
.osm-figures > div {
	background: var(--osm-panel);
	border-radius: 18px;
	padding: 18px 20px;
}
.osm-figures dt { font: 700 14px var(--sans); color: var(--osm-muted); margin: 0 0 6px; }
.osm-figures dd { margin: 0; font: 700 28px/1.1 var(--serif); }
.osm-figures dd small { display: block; font: 400 13px var(--sans); color: var(--osm-muted); margin-top: 6px; }

/* ---------- Quick links: the colored tile row ---------- */
.osm-links__head { font: 700 15px var(--sans); color: var(--osm-muted); margin: 18px 0 8px; }
.osm-links__head:first-of-type { margin-top: 0; }
.osm-links { margin-bottom: 4px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.osm-link {
	display: block;
	text-decoration: none;
	color: #fff;
	font: 700 17px var(--serif);
	padding: 22px 20px;
	border-radius: 18px;
	background: var(--c, var(--osm-purple));
}
.osm-link--coral  { --c: var(--osm-coral); }
.osm-link--purple { --c: var(--osm-purple); }
.osm-link--green  { --c: var(--osm-green); }
.osm-link--blue   { --c: var(--osm-blue); }
.osm-link--yellow { --c: var(--osm-yellow); color: var(--osm-ink); }
.osm-link:hover { filter: brightness(1.06); }

/* ---------- Leaderboard: commission first, revenue in parens ---------- */
.osm-leaders { padding-left: 22px; margin: 0; font-size: 17px; }
.osm-leaders li { margin: 6px 0; }
.osm-leaders b { color: var(--osm-blue); }

/* ---------- Tables ---------- */
.osm-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.osm-table th, .osm-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--osm-line); }
.osm-table th { font: 700 13px var(--sans); color: var(--osm-muted); border-bottom: 2px solid var(--osm-line); }
.osm-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.osm-table tbody tr:hover { background: #fbfbfb; }
.osm-table a { font-weight: 700; text-decoration: none; }
.osm-table a:hover { text-decoration: underline; }

.osm-status {
	display: inline-block;
	font: 600 12px/1 var(--sans);
	padding: 5px 10px;
	border-radius: 999px;
	background: var(--osm-panel);
	color: var(--osm-ink);
	white-space: nowrap;
}
.osm-status--sent, .osm-status--approved { background: #fff3c4; }
.osm-status--revision { background: #ffe0e0; }
.osm-status--ready, .osm-status--invoiced { background: #ecdcf6; color: var(--osm-purple); }
.osm-status--processed, .osm-status--procuring { background: #dff2e6; color: #1f6a3b; }
.osm-status--partial { background: #fff3c4; color: #7a5a00; }
.osm-status--shipped, .osm-status--complete { background: var(--osm-green); color: #fff; }
.osm-status--cancelled { background: #eee; color: var(--osm-muted); text-decoration: line-through; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
	.osm-tiles { grid-template-columns: repeat(2, 1fr); }
	.osm-figures { grid-template-columns: 1fr; }
	.osm-table th:nth-child(n+5):not(:last-child), .osm-table td:nth-child(n+5):not(:last-child) { display: none; }
}
@media (max-width: 480px) {
	.osm-tiles { grid-template-columns: 1fr; }
	.osm-nav__site { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}

/* ======================================================================
   Quote editor
   ====================================================================== */

.osm-hero--quote { padding-top: 28px; }
.osm-hero--quote .osm-script { font-size: clamp(40px, 7vw, 64px); margin-bottom: 20px; }

.osm-flash {
	margin: 18px 0 0;
	padding: 12px 16px;
	border-radius: 12px;
	background: #e9f7ee;
	color: #1f6a3b;
	font-weight: 600;
}
.osm-flash--error { background: #ffe8e8; color: #9b1c1c; }

.osm-muted { color: var(--osm-muted); }
.osm-hidden { display: none !important; }
.osm-inline { display: inline; }
.osm-inline-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.osm-quotebar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin: 22px 0 8px;
}
.osm-quotebar__status { display: flex; align-items: center; gap: 14px; }
.osm-quotebar__status .osm-status { font-size: 14px; padding: 8px 14px; }
.osm-quotebar__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.osm-btn--secondary { background: #fff; color: var(--osm-purple); box-shadow: inset 0 0 0 2px var(--osm-purple); }
.osm-btn--secondary:hover { background: #f6effa; }
.osm-btn--ghost { background: transparent; color: var(--osm-muted); box-shadow: inset 0 0 0 2px var(--osm-line); }
.osm-btn--ghost:hover { color: var(--osm-ink); background: var(--osm-panel); }
.osm-btn--danger { background: #fff; color: #9b1c1c; box-shadow: inset 0 0 0 2px #f2b5b5; }
.osm-btn--danger:hover { background: #fff3f3; }
.osm-btn--primary { background: var(--osm-purple); }
.osm-linkbtn { background: none; border: 0; color: var(--osm-purple); font: 700 14px var(--sans); cursor: pointer; padding: 0; }
.osm-linkbtn:hover { text-decoration: underline; }

/* two-column cards */
.osm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.osm-card { background: var(--osm-panel); border-radius: 18px; padding: 20px 22px; }
.osm-card h2 { font: 700 19px var(--serif); margin: 0 0 12px; }
.osm-card__head { display: flex; justify-content: space-between; align-items: baseline; }
.osm-card__head h2 { margin: 0 0 12px; }
.osm-client__name { font: 700 18px var(--serif); margin: 0 0 6px; }
.osm-address { font: inherit; margin: 0; white-space: pre-line; }
.osm-tag { display: inline-block; margin: 10px 0 0; font: 700 12px var(--sans); color: var(--osm-purple); background: #ecdcf6; padding: 4px 10px; border-radius: 999px; }

.osm-copy {
	width: 100%;
	font: 14px var(--sans);
	padding: 10px 12px;
	border: 1px solid var(--osm-line);
	border-radius: 10px;
	background: #fff;
	cursor: copy;
}
.osm-copy.is-copied { border-color: var(--osm-green); background: #e9f7ee; }

/* forms */
.osm-form--narrow { max-width: 640px; }
.osm-form--row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.osm-field { display: block; margin: 0 0 12px; }
.osm-field > span { display: block; font: 600 13px var(--sans); color: var(--osm-muted); margin-bottom: 4px; }
.osm-field > span small { font-weight: 400; }
.osm-field input, .osm-field select, .osm-field textarea, .osm-form--row input, .osm-form--row select, .osm-paste textarea {
	width: 100%;
	font: 15px var(--sans);
	padding: 9px 11px;
	border: 1px solid #cfcfcf;
	border-radius: 10px;
	background: #fff;
}
.osm-field input:focus, .osm-field select:focus, .osm-field textarea:focus { outline: 0; border-color: var(--osm-purple); box-shadow: 0 0 0 3px #ecdcf6; }
.osm-form--row input, .osm-form--row select { width: auto; flex: 1 1 180px; }
.osm-grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.osm-newclient { border: 0; padding: 0; margin: 18px 0 0; }
.osm-newclient legend { font: 700 16px var(--serif); padding: 0; margin-bottom: 10px; }
.osm-newclient h3 { font: 700 15px var(--serif); margin: 14px 0 8px; }
.osm-actions { display: flex; gap: 12px; align-items: center; margin-top: 22px; }
/* Client quote page: each button keeps its text on one line with room around it; they wrap as a group, and stack full-width on phones. */
.osm-actions--decide { flex-wrap: wrap; gap: 12px 14px; }
.osm-actions--decide .osm-btn { flex: 0 0 auto; white-space: nowrap; padding: 13px 26px; letter-spacing: .01em; }
@media (max-width: 560px) {
	.osm-actions--decide .osm-btn { flex: 1 1 100%; white-space: normal; }
}
.osm-actions--sticky {
	position: sticky; bottom: 0;
	background: rgba(255,255,255,.94);
	backdrop-filter: blur(4px);
	padding: 14px 0;
	margin-top: 16px;
	border-top: 1px solid var(--osm-line);
}
.osm-paste { background: #fffbe6; border-radius: 14px; padding: 14px 16px; margin: 0 0 14px; }

/* line items table */
.osm-tablewrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
.osm-lines { width: 100%; min-width: 1180px; border-collapse: collapse; font-size: 14px; }
/* Quote pages run wider than the rest so the number boxes stay readable. */
.osm--side .osm-main.osm-main--wide { max-width: 1480px; }
.osm-lines th { font: 700 12px var(--sans); color: var(--osm-muted); text-align: left; padding: 8px 6px; border-bottom: 2px solid var(--osm-line); }
.osm-lines td { padding: 4px 6px; border-bottom: 1px solid var(--osm-line); vertical-align: middle; }
.osm-lines .num { text-align: right; }
.osm-lines input {
	width: 100%;
	font: 14px var(--sans);
	padding: 7px 8px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: #fafafa;
}
.osm-lines input:hover { background: #f2f2f2; }
.osm-lines input:focus { outline: 0; background: #fff; border-color: var(--osm-purple); box-shadow: 0 0 0 3px #ecdcf6; }
.osm-lines input[readonly] { background: transparent; color: var(--osm-ink); }
.osm-lines input[type=number] { text-align: right; -moz-appearance: textfield; }
.osm-lines input::-webkit-outer-spin-button, .osm-lines input::-webkit-inner-spin-button { -webkit-appearance: none; }
.osm-lines .c-n { width: 34px; color: var(--osm-muted); text-align: right; font-variant-numeric: tabular-nums; }
.osm-lines .c-desc { width: 28%; }
.osm-lines .c-vendor { width: 10%; }
.osm-lines .c-url { width: 12%; position: relative; }
.osm-lines .c-url input { padding-right: 26px; }
.osm-lines .c-img { width: 11%; position: relative; }
.osm-lines .c-img input[type=url] { padding-right: 68px; }
.osm-lines .c-img .osm-upl { position: absolute; right: 44px; top: 50%; transform: translateY(-50%); cursor: pointer; font-size: 15px; line-height: 1; }
.osm-lines .c-img .osm-upl input { display: none; }
.osm-lines .c-img .osm-thumb { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--osm-line); }
.osm-lines .c-img .osm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.osm-lines .c-sku { width: 9%; }
.osm-lines .c-qty { width: 78px; }
.osm-lines .c-qty input, .osm-lines .c-cost input, .osm-lines .c-price input { min-width: 70px; font-size: 15px; font-variant-numeric: tabular-nums; }
.osm-lines .c-cost, .osm-lines .c-price { width: 112px; }
.osm-lines .c-total, .osm-lines .c-margin { width: 96px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.osm-replaces { margin-top: 3px; }
.osm-replaces .osm-replaces__toggle { font-size: 12px; }
.osm-replaces .osm-replaces__input { display: none; margin-top: 3px; font-size: 13px; background: #fff8e1; }
.osm-replaces.is-on .osm-replaces__input { display: block; }
.osm-replaces.is-on .osm-replaces__toggle { color: var(--osm-muted); }
.osm-replaces-note { font-size: 13px; color: #7a5a00; }
.osm-pic img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px var(--osm-line); display: block; }
.osm-grid-title { display: grid; grid-template-columns: 6em 1fr; gap: 6px; }
.osm-btn--green { background: #1f7a3f; color: #fff; }
.osm-btn--green:hover { background: #186332; }
.osm-btn--purple { background: var(--osm-purple); color: #fff; }
.osm-lines .c-margin.is-neg { color: #9b1c1c; font-weight: 700; }
.osm-lines .c-x { width: 28px; }
.osm-ext { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); text-decoration: none; font-size: 13px; }
.osm-x { background: none; border: 0; color: #bbb; font-size: 20px; line-height: 1; cursor: pointer; padding: 4px; }
.osm-x:hover { color: #9b1c1c; }

/* totals */
.osm-totals dl { margin: 0; }
.osm-totals dl > div { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px solid #e3e3e3; }
.osm-totals dt { font-weight: 600; color: var(--osm-muted); }
.osm-totals dt small { font-weight: 400; }
.osm-totals dd { margin: 0; font: 700 18px var(--serif); font-variant-numeric: tabular-nums; }
.osm-totals dd small { font: 400 13px var(--sans); color: var(--osm-muted); }
.osm-totals__comm { border-bottom: 0 !important; padding-top: 14px !important; }
.osm-totals__comm dd { font-size: 24px; color: var(--osm-purple); }

/* manual flip + history */
.osm-flip details { background: var(--osm-panel); border-radius: 14px; padding: 12px 18px; }
.osm-flip summary { cursor: pointer; font-weight: 700; }
.osm-log { list-style: none; padding: 0; margin: 0; }
.osm-log li { padding: 8px 0; border-bottom: 1px solid var(--osm-line); font-size: 14px; }
.osm-log time { display: inline-block; width: 120px; color: var(--osm-muted); font-variant-numeric: tabular-nums; }

@media (max-width: 820px) {
	.osm-cols { grid-template-columns: 1fr; }
	.osm-grid-3 { grid-template-columns: 1fr; }
	.osm-log time { display: block; width: auto; }
}

/* shipments */
.osm-shipments { list-style: none; padding: 0; margin: 0; }
.osm-shipments > li { padding: 10px 0; border-bottom: 1px solid var(--osm-line); }
.osm-shipments > li > a { font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }
.osm-shipments__lines { margin: 6px 0 0 16px; padding: 0; color: var(--osm-muted); font-size: 14px; }

/* view-as toggle */
.osm-viewas { display: inline-flex; border: 2px solid var(--osm-line); border-radius: 999px; overflow: hidden; margin-right: 6px; }
.osm-viewas a { font: 700 13px var(--sans); color: var(--osm-muted); text-decoration: none; padding: 4px 12px; border: 0 !important; }
.osm-viewas a.is-on { background: var(--osm-yellow); color: var(--osm-ink); }
.osm-viewnote { margin: -18px 0 20px; color: var(--osm-muted); font-size: 14px; }

/* ======================================================================
   Client portal
   ====================================================================== */
.osm-nav--portal { justify-content: flex-start; }
.osm-portal__lead { font: 400 18px/1.5 var(--sans); margin: 22px 0 8px; }
.osm-portal__decide { background: #fffbe6; border-radius: 20px; padding: 22px 26px; margin-top: 22px; }
.osm-portal__pay { background: #e9f7ee; }
.osm-portal__form { max-width: 720px; }
.osm-portal__items td, .osm-portal__items th { font-size: 15px; }
.osm-portal__totallabel { text-align: right; font: 700 14px var(--sans); color: var(--osm-muted); border-bottom: 0; }
.osm-portal__total { font: 700 22px var(--serif); border-bottom: 0; }
.osm-portal__help { margin-top: 36px; text-align: center; }
.osm-ok { color: var(--osm-green); font-weight: 700; }

/* progress rail */
.osm-steps { list-style: none; display: flex; gap: 0; padding: 0; margin: 26px 0 0; counter-reset: s; }
.osm-steps li { flex: 1; position: relative; text-align: center; font: 600 13px var(--sans); color: var(--osm-muted); padding-top: 26px; }
.osm-steps li::before { content: ''; position: absolute; top: 8px; left: 50%; width: 14px; height: 14px; border-radius: 50%; background: #d8d8d8; transform: translateX(-50%); z-index: 1; }
.osm-steps li::after { content: ''; position: absolute; top: 14px; left: 50%; right: -50%; height: 3px; background: #d8d8d8; }
.osm-steps li:last-child::after { display: none; }
.osm-steps li.is-done { color: var(--osm-ink); }
.osm-steps li.is-done::before, .osm-steps li.is-done::after { background: var(--osm-green); }
.osm-steps li.is-current { color: var(--osm-ink); font-weight: 700; }
.osm-steps li.is-current::before { background: var(--osm-yellow); box-shadow: 0 0 0 4px #fff3c4; }
.osm-steps.is-cancelled li.is-current::before { background: #bbb; box-shadow: none; }

/* message thread */
.osm-thread { list-style: none; padding: 0; margin: 0 0 18px; }
.osm-thread li { background: var(--osm-panel); border-radius: 14px; padding: 12px 16px; margin: 0 0 10px; max-width: 78%; }
.osm-thread li.is-mine { background: #ecdcf6; margin-left: auto; }
.osm-thread b { font: 700 13px var(--sans); }
.osm-thread time { font-size: 12px; color: var(--osm-muted); margin-left: 8px; }
.osm-thread p { margin: 4px 0 0; font-size: 15px; }

@media (max-width: 600px) {
	.osm-steps li { font-size: 11px; }
	.osm-thread li { max-width: 100%; }
}

/* fulfillment panels */
/* Dashboard status bar: one chip per stage, count big, label under it. Lives with the sections (same top margin and h2) so it reads as part of the page, not a stray pill. */
.osm-statusbar h2 { margin-bottom: 12px; }
.osm-statusbar__row { display: flex; flex-wrap: wrap; gap: 10px; }
.osm-statusbar__chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 128px; padding: 12px 16px; border-radius: 14px; background: var(--osm-panel); color: var(--osm-ink); text-decoration: none; border: 2px solid transparent; }
.osm-statusbar__chip b { font: 700 24px var(--serif); line-height: 1; color: var(--osm-purple); }
.osm-statusbar__chip span { font: 600 13px var(--sans); color: var(--osm-muted); }
.osm-statusbar__chip:hover, .osm-statusbar__chip:focus-visible { border-color: var(--osm-yellow); background: #fffaf0; }
.osm-statusbar__chip.is-on { background: var(--osm-yellow); border-color: var(--osm-yellow); }
.osm-statusbar__chip.is-on b, .osm-statusbar__chip.is-on span { color: var(--osm-ink); }
@media (max-width: 560px) { .osm-statusbar__chip { flex: 1 1 calc(50% - 10px); min-width: 0; } }

.osm-panel { background: var(--osm-panel); border-radius: 20px; padding: 22px 24px; }
.osm-panel h2 { margin-top: 0; }
.osm-panel .osm-tablewrap { margin: 0; padding: 0; }
.osm-panel .osm-lines { min-width: 0; }
.osm-panel .osm-lines th, .osm-panel .osm-lines td { padding: 8px 8px; }
.osm-proc tr.is-done td { color: var(--osm-muted); }
.osm-proc tr.is-done td:nth-child(2) { font-style: italic; }
.osm-check { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; font-size: 13px; }
.osm-hr { border: 0; border-top: 1px solid #ddd; margin: 16px 0; }
.osm-panel details { margin-top: 4px; }
.osm-panel summary { cursor: pointer; font-weight: 700; }
.osm-docs { list-style: none; padding: 0; margin: 0 0 14px; }
.osm-docs li { padding: 8px 0; border-bottom: 1px solid #e3e3e3; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.osm-docs a { font-weight: 700; text-decoration: none; }
.osm-panel input[type=file] { flex: 2 1 260px; }

/* two-column leaderboard */
.osm-leaders-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.osm-leaders-grid h3 { font: 700 16px var(--serif); color: var(--osm-muted); margin: 0 0 8px; }
.osm-leaders b { color: var(--osm-ink); }
@media (max-width: 600px) { .osm-leaders-grid { grid-template-columns: 1fr; } }

/* commissions */
.osm-due { color: #7a5a00; }
.osm-comm td { vertical-align: top; }
.osm-comm__actions { white-space: nowrap; }
.osm-comm__actions .osm-form--row { margin: 0; gap: 6px; }
.osm-comm__actions input { padding: 6px 8px; font-size: 13px; }
.osm-comm__detail td { background: #fafafa; font-size: 13px; padding-top: 6px; padding-bottom: 8px; }
.osm-adj { margin: 2px 0; }

/* reviews */
.osm-rev { background: var(--osm-panel); border-radius: 18px; padding: 18px 22px; }
.osm-rev__h { font: 700 14px var(--sans); color: var(--osm-muted); margin: 14px 0 4px; }
.osm-rev__p { margin: 0; white-space: pre-line; }
.osm-rev__fb { margin-top: 16px; padding: 12px 16px; background: #ecdcf6; border-radius: 12px; }

/* ======================================================================
   Side menu layout (staff pages)
   ====================================================================== */
.osm--side { display: flex; min-height: 100vh; }
.osm-side {
	width: 232px; flex: 0 0 232px;
	background: var(--osm-panel);
	border-right: 1px solid var(--osm-line);
	padding: 22px 18px;
	display: flex; flex-direction: column; gap: 18px;
	position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.osm-side__brand { display: block; text-decoration: none; }
.osm-side__logo { width: 100%; max-width: 190px; height: auto; display: block; }
.osm-side__viewas { align-self: flex-start; }
/* Admin / Sales switch in the sidebar: two real buttons with explicit sizes, so it shows the same in the phone drawer as on desktop. */
.osm-side__switch { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.osm-side__switchlabel { flex: 1 1 100%; font: 600 12px var(--sans); color: var(--osm-muted); text-transform: uppercase; letter-spacing: .04em; }
.osm-side__switchbtn { flex: 1 1 0; display: block; min-height: 36px; line-height: 36px; text-align: center; font: 700 14px/36px var(--sans); color: var(--osm-muted); background: #fff; border: 2px solid var(--osm-line); border-radius: 10px; text-decoration: none; }
.osm-side__switchbtn.is-on { background: var(--osm-yellow); border-color: var(--osm-yellow); color: var(--osm-ink); }
.osm-side__switchbtn:hover { color: var(--osm-ink); }
.osm-side__nav { display: flex; flex-direction: column; gap: 2px; }
.osm-side__nav a {
	font: 700 15px var(--sans); color: var(--osm-muted); text-decoration: none;
	padding: 9px 12px; border-radius: 10px; border-left: 4px solid transparent;
}
.osm-side__nav a:hover { color: var(--osm-ink); background: #ececec; }
.osm-side__nav a.is-active { color: var(--osm-ink); background: #fff; border-left-color: var(--osm-yellow); }
.osm-side__foot { margin-top: auto; font-size: 13px; color: var(--osm-muted); }
.osm-side__foot a { color: var(--osm-purple); text-decoration: none; font-weight: 700; }
.osm-side__user { font-weight: 700; color: var(--osm-ink); margin-bottom: 4px; }
.osm-body { flex: 1 1 auto; min-width: 0; }
.osm--side .osm-main { max-width: 1040px; margin: 0 auto; padding: 8px 32px 64px; }
.osm--side .osm-foot { max-width: 1040px; }
.osm--side .osm-hero { padding-top: 28px; }
.osm-menubtn { display: none; }

@media (max-width: 900px) {
	.osm--side { display: block; }
	.osm-menubtn {
		display: block; position: fixed; top: 12px; left: 12px; z-index: 30;
		font-size: 22px; line-height: 1; padding: 8px 12px; border: 0; border-radius: 10px;
		background: var(--osm-purple); color: #fff; cursor: pointer;
	}
	.osm-side {
		position: fixed; top: 0; left: 0; bottom: 0; z-index: 20; width: 260px;
		transform: translateX(-100%); transition: transform .2s ease; box-shadow: 4px 0 24px rgba(0,0,0,.12);
	}
	.osm-side:not(.osm-hidden) { transform: translateX(-100%); }
	.osm-side.is-open { transform: none; }
	.osm--side .osm-main { padding: 56px 18px 48px; }
}

/* contract signing */
.osm-ctr { background: #fff; border: 1px solid var(--osm-line); border-radius: 12px; padding: 20px 26px; max-height: 480px; overflow-y: auto; font: 14px/1.6 Georgia, serif; }
.osm-ctr h1 { font-size: 22px; margin: 0 0 4px; } .osm-ctr h2 { font-size: 16px; margin: 20px 0 6px; } .osm-ctr p { margin: 0 0 10px; }
.osm-ctr__sub { color: var(--osm-muted); font-style: italic; }
.osm-ctr__tbl { border-collapse: collapse; margin: 8px 0 12px; } .osm-ctr__tbl th, .osm-ctr__tbl td { border: 1px solid #bbb; padding: 5px 12px; text-align: left; }
.osm-ctr__blank { color: #b00; }
.osm-ctr__rev { font-size: 11px; color: #9b1c1c; background: #ffe0e0; padding: 1px 6px; border-radius: 999px; vertical-align: middle; }
/* zoom phone dock */
.osm-zp { position: fixed; right: 18px; bottom: 18px; z-index: 40; }
.osm-zp__toggle { background: var(--osm-purple); color: #fff; border: 0; border-radius: 999px; padding: 10px 16px; font: 700 14px var(--sans); cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.osm-zp__body { position: absolute; right: 0; bottom: 52px; width: 360px; height: 640px; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.25); display: flex; flex-direction: column; }
.osm-zp__hint { margin: 0; padding: 8px 12px; font: 12px/1.4 var(--sans); color: var(--osm-muted); background: #fffbe6; border-bottom: 1px solid #f0e6b0; }
.osm-zp__body iframe { flex: 1 1 auto; min-height: 580px; }
.osm-zp__body iframe { width: 100%; height: 100%; border: 0; }
.osm-zp__who { font-weight: 400; opacity: .9; }

/* help */
.osm-help__bar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 20px 0 6px; }
.osm-help__toc { display: flex; gap: 6px 14px; flex-wrap: wrap; width: 100%; margin-top: 6px; }
.osm-help__toc a { font: 600 13px var(--sans); color: var(--osm-purple); text-decoration: none; }
.osm-help__sec { background: var(--osm-panel); border-radius: 18px; padding: 20px 24px; }
.osm-help__sec h2 { margin-top: 0; }
.osm-help__body p, .osm-help__body li { font-size: 15px; line-height: 1.6; }
.osm-help__body ol, .osm-help__body ul { padding-left: 22px; }
.osm-help__body code { background: #fff; padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.osm-help__videos { margin: 0 0 12px; }

/* landing */
.osm-land { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 30px; }
.osm-land__card { background: var(--osm-panel); border-radius: 20px; padding: 24px 26px; }
.osm-land__card h2 { font: 700 20px var(--serif); margin: 0 0 10px; }
.osm-land__card p { margin: 0; }
.osm-land__staff { background: #ecdcf6; }

/* procurement brief */
.osm-brief { background: #fff; border: 1px solid var(--osm-line); border-radius: 16px; padding: 18px 24px; font-size: 14px; }
.osm-brief h2 { font: 700 20px var(--serif); margin: 0 0 8px; }
.osm-brief h3 { font: 700 15px var(--serif); margin: 18px 0 6px; padding-top: 10px; border-top: 1px solid var(--osm-line); }
.osm-brief__standing { background: #fffbe6; border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.osm-brief__standing pre { margin: 4px 0 0; white-space: pre-wrap; font: 13px/1.5 var(--sans); }
.osm-brief__lines { padding-left: 28px; margin: 0; }
.osm-brief__lines li { margin: 0 0 10px; line-height: 1.5; }
.osm-brief__lines li.is-done { opacity: .6; }
.osm-brief__lines code { background: var(--osm-panel); padding: 1px 6px; border-radius: 6px; }
.osm-brief__text { width: 100%; font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace; padding: 12px; border: 1px solid var(--osm-line); border-radius: 12px; }
.osm-status--expired { background: #eee; color: #777; }

/* notes log polish */
#notes textarea { width: 100%; min-height: 64px; box-sizing: border-box; }
.osm-log time { display: inline-block; min-width: 160px; white-space: nowrap; }
.osm-status--hold { background: #fff3c4; color: #7a5a00; }
.osm-fin td, .osm-fin th { font-size: 13px; padding: 7px 8px; white-space: nowrap; }

/* small inline buttons (document share) */
.osm-btn--sm { padding: 4px 10px; font-size: .82em; }
.osm-docs li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.osm-docs .osm-inline { display: inline-flex; gap: 6px; align-items: center; }
.osm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; align-items: start; }
@media (max-width: 760px) { .osm-grid-2 { grid-template-columns: 1fr; } }
