/*
 * Sales point-of-sale language.
 *
 * Lifted verbatim out of an inline <style> block in make_sale.php so the
 * ordering screens can share it rather than each inventing their own look.
 * make_sale remains the reference implementation: hero with status chips,
 * cards with a heading bar, and CSS grid overriding w3's floated columns.
 *
 * Tokens
 *   #087f76  brand teal        #f2b441  accent
 *   #17212b  ink               #687684  muted
 *   #dce3e8  line              #f4f7f8  soft
 *
 * The same teal as sales-returns.css and sales-workspace.css, so the three
 * languages read as one product.
 */

.sales-pos-page {
	--pos-ink: #17212b;
	--pos-muted: #687684;
	--pos-line: #dce3e8;
	--pos-soft: #f4f7f8;
	--pos-brand: #087f76;
	--pos-brand-dark: #05635d;
	--pos-accent: #f2b441;
	max-width: 1580px;
	margin: 0 auto;
	padding: 20px 0 42px;
	color: var(--pos-ink);
}
.sales-pos-page .w3-row::before, .sales-pos-page .w3-row::after { display: none !important; content: none !important; }
.sales-pos-hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 16px;
	padding: 22px 24px;
	border-radius: 10px;
	border: 1px solid #cfe4e1;
	color: var(--pos-ink);
	background: linear-gradient(125deg, #ffffff 0%, #f2faf8 62%, #dff3ef 100%);
	box-shadow: 0 8px 24px rgba(23, 33, 43, .08);
}
.sales-pos-eyebrow { display: block; margin-bottom: 5px; color: var(--pos-brand); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sales-pos-hero h1 { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 750; }
.sales-pos-hero p { margin: 7px 0 0; color: var(--pos-muted); }
.sales-pos-hero-status { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.sales-pos-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #bfd9d5; border-radius: 999px; color: #176c65; background: rgba(255,255,255,.78); font-size: 12px; font-weight: 700; white-space: nowrap; }
.sales-pos-card { margin-bottom: 14px !important; padding: 0 !important; border: 1px solid var(--pos-line) !important; border-radius: 9px !important; background: #fff !important; box-shadow: 0 3px 12px rgba(23, 33, 43, .055); overflow: hidden; }
.sales-pos-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--pos-line); background: #fbfcfd; }
.sales-pos-card-heading h2 { margin: 0; font-size: 16px; font-weight: 750; }
.sales-pos-card-heading p { margin: 4px 0 0; color: var(--pos-muted); font-size: 12px; }
/*
 * make_sale places the row directly inside the context card; make_sales_order
 * has to wrap both its cards in one <form>, so the row is a grandchild there.
 * Both shapes get the same grid rather than the markup being bent to fit.
 */
.sales-pos-context > .w3-row,
.sales-pos-context > form > .w3-row { display: grid; grid-template-columns: 1.7fr .8fr .9fr .9fr .9fr; align-items: stretch; padding: 0 !important; }
.sales-pos-context > .w3-row > div,
.sales-pos-context > form > .w3-row > div { float: none !important; width: auto !important; padding: 16px 18px; border-right: 1px solid var(--pos-line) !important; }
.sales-pos-context > .w3-row > div:last-child,
.sales-pos-context > form > .w3-row > div:last-child { border-right: 0 !important; }
.sales-pos-context .w3-row.w3-padding { padding: 0 !important; }
.sales-pos-context label { display: block; color: var(--pos-muted) !important; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.sales-pos-context h2 { margin: 7px 0 0; color: var(--pos-ink); font-size: 18px; }
.sales-pos-context select, .sales-pos-context input { margin-top: 7px; min-height: 42px; border: 1px solid #b9c5cc !important; border-radius: 6px; background: #fff !important; }
.sales-pos-entry-card > .w3-row { display: grid; grid-template-columns: minmax(250px, 2fr) 52px minmax(90px, .55fr) minmax(105px, .65fr) minmax(120px, .75fr) minmax(135px, .85fr) minmax(120px, .75fr); align-items: end; gap: 12px; padding: 18px !important; }
.sales-pos-entry-card .w3-col { float: none !important; width: auto !important; padding: 0 !important; border: 0 !important; }
.sales-pos-entry-card label, .sales-pos-checkout-card label, .sales-pos-actions-card label { display: block; margin-bottom: 7px; color: #35424d !important; font-size: 12px; font-weight: 800; }
.sales-pos-entry-card input, .sales-pos-entry-card select, .sales-pos-checkout-card select, .sales-pos-actions-card textarea { min-height: 44px; border: 1px solid #b9c5cc !important; border-radius: 6px; background: #fff !important; }
.sales-pos-entry-card input:focus, .sales-pos-entry-card select:focus, .sales-pos-checkout-card select:focus, .sales-pos-actions-card textarea:focus { border-color: var(--pos-brand) !important; box-shadow: 0 0 0 3px rgba(8,127,118,.12); outline: 0; }
.sales-pos-entry-card .select2-container, .sales-pos-checkout-card .select2-container { width: 100% !important; }
.sales-pos-search-button { display: grid !important; width: 44px !important; height: 44px; padding: 0 !important; place-items: center; border-radius: 6px !important; color: var(--pos-brand) !important; background: #e9f6f4 !important; font-size: 17px !important; }
.sales-pos-add-button, .sales-pos-pay-button { display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; padding: 10px 16px !important; border-radius: 6px !important; color: #fff !important; background: var(--pos-brand) !important; font-weight: 800; }
.sales-pos-add-button:hover, .sales-pos-pay-button:hover { background: var(--pos-brand-dark) !important; }
.sales-pos-add-button h4, .sales-pos-pay-button h4 { margin: 0; font-size: 14px; font-weight: 800; }
.sales-pos-cart-card > .w3-row { padding: 0 !important; overflow-x: auto; }
.sales-pos-table { min-width: 920px; margin: 0 !important; border: 0 !important; }
.sales-pos-table th, .sales-pos-table td { padding: 12px 14px !important; border: 0 !important; border-bottom: 1px solid #e7ecef !important; vertical-align: middle; }
.sales-pos-table th.sales-pos-money, .sales-pos-table td.sales-pos-money { text-align: right; font-variant-numeric: tabular-nums; }
.sales-pos-table th { color: #4b5a66; background: #eef3f5 !important; font-size: 11px; letter-spacing: .045em; text-transform: uppercase; }
.sales-pos-table tbody tr:hover { background: #f1faf8; }
.sales-pos-table a { color: var(--pos-brand-dark); font-weight: 750; text-decoration: none; }
.sales-pos-table td:last-child a { color: #b3261e; }
.sales-pos-checkout-card > .w3-row { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, .8fr); gap: 24px; padding: 20px !important; }
.sales-pos-checkout-card .w3-col { float: none !important; width: auto !important; padding: 0 !important; }
.sales-pos-customer-area { display: grid; grid-template-columns: minmax(260px, 1.6fr) minmax(180px, .8fr); gap: 18px; }
.sales-pos-customer-area .w3-col { width: auto !important; }
.sales-pos-customer-area a { float: right; color: var(--pos-brand); font-weight: 750; }
.sales-pos-checkout-card .sales-pos-total-panel { padding: 18px 20px !important; border: 1px solid #cfe4e1; border-radius: 8px; color: var(--pos-ink); background: #f0f8f6; }
.sales-pos-total-panel .w3-row { display: grid; grid-template-columns: 1fr 42px 1fr; padding: 10px 12px; border-bottom: 1px solid #d7e7e4; }
.sales-pos-total-panel .w3-row:last-child { margin-top: 4px; padding: 12px 10px; border: 0; border-radius: 6px; color: #fff; background: var(--pos-brand); font-size: 17px; }
.sales-pos-total-panel label { float: none !important; width: auto !important; margin: 0; color: #44535e !important; }
.sales-pos-total-panel .w3-row:last-child label { color: #fff !important; }
.sales-pos-actions-card > .w3-row { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, .8fr); align-items: end; gap: 24px; padding: 20px !important; }
.sales-pos-actions-card .w3-col { float: none !important; width: auto !important; padding: 0 !important; }
.sales-pos-actions-card textarea { resize: vertical; }
.sales-pos-empty-note { padding: 30px; color: var(--pos-muted); text-align: center; }
.sales-pos-page .select2-container .select2-selection--single { height: 44px !important; border-color: #b9c5cc; border-radius: 6px; }
.sales-pos-page .select2-selection__rendered { line-height: 42px !important; }
.sales-pos-page .select2-selection__arrow { height: 42px !important; }
@media (max-width: 1100px) {
	.sales-pos-context > .w3-row,
	.sales-pos-context > form > .w3-row { grid-template-columns: repeat(2, 1fr); }
	.sales-pos-context > .w3-row > div:first-child { grid-column: 1 / -1; }
	.sales-pos-entry-card > .w3-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sales-pos-entry-card > .w3-row > div:first-of-type { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
	.sales-pos-page { margin-top: 40px; padding-top: 8px; }
	.sales-pos-hero { align-items: flex-start; flex-direction: column; padding: 52px 18px 18px; }
	.sales-pos-hero-status { justify-content: flex-start; }
	.sales-pos-context > .w3-row, .sales-pos-context > form > .w3-row, .sales-pos-entry-card > .w3-row, .sales-pos-checkout-card > .w3-row, .sales-pos-customer-area, .sales-pos-actions-card > .w3-row { grid-template-columns: 1fr; }
	.sales-pos-context > .w3-row > div:first-child { grid-column: auto; }
	.sales-pos-entry-card > .w3-row > div:first-of-type { grid-column: auto; }
	.sales-pos-search-button { width: 100% !important; }
}

/* ---- Module menu ---------------------------------------------------------
 *
 * The link menu that customers.php and the six *_reports pages all render.
 * Tiles rather than the old wrapped row of bordered buttons, so a task can be
 * found by scanning one column instead of reading a paragraph of them.
 */

.sales-pos-menu-body {
	padding: 6px 18px 18px;
}

.sales-pos-menu-section {
	margin: 16px 0 10px;
	color: var(--pos-muted);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.sales-pos-menu-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 10px;
}

.sales-pos-menu-link {
	display: flex;
	align-items: center;
	gap: 11px;
	min-height: 48px;
	padding: 10px 13px;
	border: 1px solid var(--pos-line);
	border-radius: 7px;
	color: var(--pos-ink);
	background: #fff;
	font-weight: 700;
	text-decoration: none;
	transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background-color .12s ease;
}

/*
 * The lift-on-hover is borrowed from fiisys's report dashboard (.card:hover
 * { transform: translateY(-4px) }): a small upward shift plus a deeper
 * shadow reads as "this is a surface you can press" more than a flat colour
 * change alone. Toned down from their -4px, since these tiles are smaller
 * and denser than their report cards.
 */
.sales-pos-menu-link:hover {
	border-color: var(--pos-brand);
	background: #f1faf8;
	transform: translateY(-2px);
	box-shadow: 0 6px 14px rgba(23, 33, 43, .12);
}

.sales-pos-menu-link i {
	display: grid;
	flex: none;
	width: 32px;
	height: 32px;
	place-items: center;
	border-radius: 6px;
	color: var(--pos-brand);
	background: #e9f6f4;
	font-size: 15px;
}

@media (max-width: 720px) {
	.sales-pos-menu-grid {
		grid-template-columns: 1fr;
	}
}

/* ---- Filter bar ----------------------------------------------------------
 *
 * The shape most of the module's reports and lists share: a few selects and
 * dates over a table. Auto-fitting rather than fixed tracks, because the
 * number of controls varies from two to six across those screens.
 */

.sales-pos-filter {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	align-items: end;
	gap: 12px;
	padding: 16px 18px;
}

.sales-pos-filter .w3-col {
	float: none !important;
	width: auto !important;
	padding: 0 !important;
}

.sales-pos-filter label {
	display: block;
	margin-bottom: 7px;
	color: #35424d !important;
	font-size: 12px;
	font-weight: 800;
}

.sales-pos-filter input,
.sales-pos-filter select {
	width: 100%;
	min-height: 42px;
	border: 1px solid #b9c5cc !important;
	border-radius: 6px;
	background: #fff !important;
}

.sales-pos-filter input:focus,
.sales-pos-filter select:focus {
	border-color: var(--pos-brand) !important;
	box-shadow: 0 0 0 3px rgba(8, 127, 118, .12);
	outline: 0;
}

/* A value the session fixes rather than the operator chooses -- the pay
   station, which is the branch signed in to. Reads as settled fact, not as
   an input someone forgot to fill in. */
.sales-pos-filter input.sales-pos-readonly,
input.sales-pos-readonly {
	background: #eef3f5 !important;
	border-style: dashed !important;
	color: #33454f;
	cursor: default;
	font-weight: 700;
}

input.sales-pos-readonly:focus {
	box-shadow: none;
	border-color: #b9c5cc !important;
}

/* select2 renders its own widget beside the native <select>; without this it
   keeps select2's small default width instead of filling the field like
   every other input here does. Shared with .sales-pos-field, the stacked-
   form equivalent of this same grid-of-inputs shape. */
.sales-pos-filter .select2-container,
.sales-pos-field .select2-container {
	width: 100% !important;
}

.sales-pos-filter .select2-selection--single,
.sales-pos-field .select2-selection--single {
	height: 42px !important;
	border: 1px solid #b9c5cc !important;
	border-radius: 6px !important;
}

.sales-pos-filter .select2-selection__rendered,
.sales-pos-field .select2-selection__rendered {
	line-height: 40px !important;
}

.sales-pos-filter .select2-selection__arrow,
.sales-pos-field .select2-selection__arrow {
	height: 40px !important;
}

.sales-pos-filter button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 42px;
	border: 0;
	border-radius: 6px !important;
	color: #fff !important;
	background: var(--pos-brand) !important;
	font-weight: 800;
	cursor: pointer;
}

.sales-pos-filter button:hover {
	background: var(--pos-brand-dark) !important;
}

/* Tables sit flush inside their card. */
.sales-pos-card > .sales-pos-table,
.sales-pos-card > .sales-pos-table-wrap {
	margin: 0 !important;
}

.sales-pos-table-wrap {
	width: 100%;
	overflow-x: auto;
}

.sales-pos-table caption {
	padding: 10px 14px;
	color: var(--pos-muted);
	text-align: left;
	caption-side: top;
}

@media (max-width: 720px) {
	.sales-pos-filter {
		grid-template-columns: 1fr;
	}
}

/*
 * The cart table in make_sale needs its 920px floor so its columns do not
 * crush; a five-column report does not, and would otherwise be stretched to
 * fill it.
 */
.sales-pos-table.is-compact {
	min-width: 0;
}

/* ---- Report Center ---------------------------------------------------- */

/*
 * A richer tile than .sales-pos-menu-link alone: a report needs a sentence of
 * context an ordinary nav link does not, since the operator is choosing
 * between thirteen similarly-named branch reports rather than recognising a
 * single "Make a Sale" button.
 */
.sales-pos-menu-link.has-desc {
	align-items: flex-start;
	min-height: 66px;
	padding: 13px 15px;
}

.sales-pos-menu-link.has-desc i {
	margin-top: 3px;
}

.sales-pos-menu-link-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.sales-pos-menu-link-text strong {
	overflow-wrap: anywhere;
	font-size: 13px;
	font-weight: 800;
	color: var(--pos-ink);
}

.sales-pos-menu-link-text small {
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--pos-muted);
}

.sales-pos-tag {
	display: inline-block;
	flex: none;
	margin-left: auto;
	padding: 2px 7px;
	border-radius: 999px;
	background: #fff4d6;
	color: #7a5400;
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: .03em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* The single search field at the top of the center. */
.sales-pos-report-search {
	position: relative;
	padding: 14px 18px;
}

.sales-pos-report-search input {
	width: 100%;
	min-height: 44px;
	padding: 0 16px 0 40px;
	border: 1px solid #b9c5cc;
	border-radius: 7px;
	background: #fff;
	font-size: 14px;
}

.sales-pos-report-search input:focus {
	border-color: var(--pos-brand);
	box-shadow: 0 0 0 3px rgba(8, 127, 118, .12);
	outline: 0;
}

.sales-pos-report-search i {
	position: absolute;
	top: 50%;
	left: 34px;
	color: var(--pos-muted);
	transform: translateY(-50%);
}

.sales-pos-report-search .sales-pos-panel-note {
	display: block;
	margin-top: 8px;
	color: var(--pos-muted);
	font-size: 12px;
}

.sales-pos-report-empty {
	display: none;
	padding: 30px;
	color: var(--pos-muted);
	text-align: center;
}

/*
 * The category cards used to stack full width, one under another. fiisys's
 * report dashboard (.dashboard-grid: repeat(auto-fit, minmax(280px,1fr)))
 * lets its report cards sit side by side and reflow as the window narrows;
 * borrowed here so Sales Performance, Cash & Banking and Inventory read as
 * one dashboard instead of a long scroll of separate sections.
 */
.sales-pos-report-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
	align-items: start;
	gap: 16px;
}

.sales-pos-report-grid .sales-pos-report-group {
	margin-bottom: 0;
}

/* ---- Summary strip -------------------------------------------------------
 *
 * A row of at-a-glance counts above a table, e.g. web_orders.php's payment /
 * fulfilment breakdown. Distinct from .sales-pos-hero-status (labels tied to
 * the page as a whole) and .sales-summary-item in sales-workspace.css (that
 * language's own equivalent) -- this is the sales-pos-* version of the same
 * idea, sized for four short stat tiles rather than a form-review summary.
 */
.sales-pos-summary-strip {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
	margin-bottom: 16px;
}

.sales-pos-summary-tile {
	padding: 14px 16px;
	border: 1px solid var(--pos-line);
	border-radius: 9px;
	background: #fff;
	box-shadow: 0 3px 12px rgba(23, 33, 43, .055);
}

.sales-pos-summary-value {
	display: block;
	color: var(--pos-ink);
	font-size: 24px;
	font-weight: 750;
	line-height: 1.2;
}

.sales-pos-summary-tile.is-amber .sales-pos-summary-value { color: #a86509; }
.sales-pos-summary-tile.is-blue .sales-pos-summary-value { color: #2c628d; }
.sales-pos-summary-tile.is-green .sales-pos-summary-value { color: #087f3f; }

.sales-pos-summary-label {
	display: block;
	margin-top: 4px;
	color: var(--pos-muted);
	font-size: 12px;
	font-weight: 600;
}

/* The secondary line under a table cell's main value -- a sub-reference,
   phone number, timestamp -- one step quieter than the cell's own text. */
.sales-pos-table-sub {
	color: var(--pos-muted);
	font-size: 11.5px;
}

.sales-pos-tag.is-green { background: #e7f6ed; color: #086b39; }
.sales-pos-tag.is-amber { background: #fff4d6; color: #7a5400; }
/* Cancelled: present but finished with, so it recedes rather than alarms. */
.sales-pos-tag.is-grey { background: #eceff1; color: #546e7a; }

/* ---- Stacked form ---------------------------------------------------------
 *
 * .sales-pos-filter lays fields out in a horizontal row -- right for a
 * search/date bar, wrong for a many-field create form meant to read top to
 * bottom in a narrow column (customer_job_orders.php's "New Customer Job").
 * This is that shape: one field per line, consistent spacing and sizing with
 * everything else in the language.
 */
.sales-pos-form {
	padding: 18px;
}

.sales-pos-field {
	margin-bottom: 14px;
}

.sales-pos-field label {
	display: block;
	margin-bottom: 6px;
	color: #35424d;
	font-size: 12px;
	font-weight: 800;
}

.sales-pos-field input,
.sales-pos-field select,
.sales-pos-field textarea {
	width: 100%;
	min-height: 42px;
	padding: 0 12px;
	border: 1px solid #b9c5cc;
	border-radius: 6px;
	background: #fff;
	font-family: inherit;
	font-size: 14px;
}

.sales-pos-field textarea {
	min-height: 80px;
	padding: 10px 12px;
	resize: vertical;
}

.sales-pos-field input:focus,
.sales-pos-field select:focus,
.sales-pos-field textarea:focus {
	border-color: var(--pos-brand);
	box-shadow: 0 0 0 3px rgba(8, 127, 118, .12);
	outline: 0;
}

.sales-pos-field-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

/* A generic full-width teal action button -- the same visual .sales-pos-
   add-button/.sales-pos-pay-button already use for make_sale, extended to a
   name that does not imply one specific screen. */
.sales-pos-button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 44px;
	padding: 10px 16px !important;
	border: 0;
	border-radius: 6px !important;
	color: #fff !important;
	background: var(--pos-brand) !important;
	font-weight: 800;
	cursor: pointer;
}

.sales-pos-button:hover {
	background: var(--pos-brand-dark) !important;
}

/* A confirmation banner -- e.g. "job order created, open it in Production" --
   distinct from .sales-pos-card, which presents data rather than an event. */
.sales-pos-notice {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 14px;
	padding: 14px 18px;
	border: 1px solid #bfd9d5;
	border-left: 4px solid var(--pos-brand);
	border-radius: 9px;
	background: #f0f8f6;
	color: var(--pos-ink);
}

@media (max-width: 720px) {
	.sales-pos-field-row {
		grid-template-columns: 1fr;
	}
}

/* A form beside a list -- customer_job_orders.php's "create on the left,
   recent orders on the right" shape, likely to recur. */
.sales-pos-split {
	display: grid;
	grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
	align-items: start;
	gap: 16px;
}

@media (max-width: 900px) {
	.sales-pos-split {
		grid-template-columns: 1fr;
	}
}

.sales-pos-button.is-secondary {
	border: 1px solid var(--pos-brand) !important;
	color: var(--pos-brand) !important;
	background: #fff !important;
}

.sales-pos-button.is-secondary:hover {
	background: #f1faf8 !important;
}

/* A row of a few buttons that should sit side by side rather than stack full
   width -- .sales-pos-button defaults to width:100% for its usual single-
   button-per-card use, which is wrong once there are three in a row. */
.sales-pos-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sales-pos-toolbar .sales-pos-button {
	width: auto;
}

/* A page-number bar for large listings (items_list.php and anything with
   the same LIMIT/OFFSET-style pagination). */
.sales-pos-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 14px 18px;
}

.sales-pos-pagination a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	border: 1px solid var(--pos-line);
	border-radius: 6px;
	color: var(--pos-ink);
	background: #fff;
	font-weight: 700;
	text-decoration: none;
}

.sales-pos-pagination a:hover {
	border-color: var(--pos-brand);
	color: var(--pos-brand-dark);
}

.sales-pos-pagination a.is-current {
	border-color: var(--pos-brand);
	color: #fff;
	background: var(--pos-brand);
}

/* Highlights the selected item in a sidebar list of .sales-pos-menu-link
   tiles -- requests_report.php's "your pending requests" list. */
.sales-pos-menu-link.is-current {
	border-color: var(--pos-brand);
	background: #f0f8f6;
}

/* The report print action prints the same filtered table as the screen/CSV. */
@media print {
	body.sales-report-printing .eis-top-shell-v2,
	body.sales-report-printing .eis-module-search,
	body.sales-report-printing .sales-pos-filter,
	body.sales-report-printing .sales-pos-card form,
	body.sales-report-printing .sales-pos-button,
	body.sales-report-printing .sales-pos-card button,
	body.sales-report-printing .footer { display: none !important; }
	body.sales-report-printing .sales-pos-card:has(> .sales-pos-filter) { display: none !important; }
	body.sales-report-printing .w3-content { max-width: none !important; margin: 0 !important; }
	body.sales-report-printing .sales-pos-page { max-width: none; padding: 0; }
	body.sales-report-printing .sales-pos-hero,
	body.sales-report-printing .sales-pos-card { box-shadow: none !important; break-inside: avoid; }
	body.sales-report-printing .sales-pos-table-wrap { overflow: visible; }
	body.sales-report-printing .sales-pos-table { width: 100%; font-size: 9pt; }
}

/* ---- Row actions -------------------------------------------------------
 *
 * Added for the closing-stock count, where a line typed against the wrong
 * product previously had no way off the page. The icon buttons themselves are
 * .sales-invoice-icon-button, which is already loaded for this module; these
 * rules are only the cell that holds them.
 */

.sales-pos-table .sales-pos-actions-head,
.sales-pos-table .sales-pos-actions-cell {
	width: 96px;
	text-align: right;
	white-space: nowrap;
}

/* The remove control is a form so it can POST a token; it must not take a
   line of its own beside the edit link. */
.sales-pos-inline-form {
	display: inline-block;
	margin: 0;
}

/* An icon alone is not a label for anything that cannot see it. */
.sales-pos-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---- Closing stock workflow --------------------------------------------
 *
 * Posting, confirming and cancelling are three distinct stages, and the
 * postings list is filtered by which one a count is at.
 */

.closing-stage-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 0 18px 14px;
	border-bottom: 1px solid #e3e8eb;
}

.closing-stage-tab {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 13px;
	border: 1px solid #cfd8dc;
	border-radius: 4px;
	color: #455a64;
	background: #fff;
	font-weight: 700;
	text-decoration: none;
}

.closing-stage-tab:hover {
	border-color: #087f76;
	color: #00695c;
	background: #f2faf8;
	text-decoration: none;
}

.closing-stage-tab.is-current {
	border-color: #087f76;
	color: #fff;
	background: #087f76;
}

.closing-stage-count {
	padding: 1px 7px;
	border-radius: 10px;
	background: rgba(38, 50, 56, .1);
	font-size: 12px;
}

.closing-stage-tab.is-current .closing-stage-count {
	background: rgba(255, 255, 255, .25);
}

.closing-summary {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1px;
	margin: 0 18px 16px;
	border: 1px solid #dbe3e7;
	border-radius: 5px;
	overflow: hidden;
	background: #dbe3e7;
}

.closing-summary > div {
	min-width: 0;
	padding: 12px 14px;
	background: #fff;
}

.closing-summary span {
	display: block;
	margin-bottom: 3px;
	color: #607d8b;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}

.closing-summary strong {
	font-size: 16px;
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

/* What a posting allows, kept together at the foot of it. */
.closing-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 16px 18px;
	border-top: 1px solid #e3e8eb;
}

/* Cancelling asks for a reason in the same breath, so it is a field and a
   button rather than a button that opens something else. */
.closing-cancel-form {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 0;
}

.closing-cancel-form .w3-input {
	width: auto;
	min-width: 220px;
	min-height: 40px;
	border: 1px solid #b0bec5 !important;
	border-radius: 4px;
}

.closing-cancel-note {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0 18px 16px;
	padding: 14px;
	border-left: 4px solid #90a4ae;
	background: #f4f6f7;
}

.closing-cancel-note > i {
	margin-top: 2px;
	color: #546e7a;
	font-size: 20px;
}

.closing-cancel-note p {
	margin: 4px 0 0;
	color: #546e7a;
}

/* The confirmation lands here, so it leads the page once. */
.closing-confirmed-banner {
	border-left: 5px solid #087f3f;
}

.closing-confirmed-banner h2 {
	margin: 0 0 6px;
	color: #086b39;
}

.closing-confirmed-banner p {
	margin: 0 0 12px;
	color: #37474f;
}

@media (max-width: 900px) {
	.closing-summary {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/*
 * .sales-pos-button is width:100% by design -- it is the full-width submit at
 * the foot of a form. In the posting's action row they sit side by side, so
 * the width is released only there.
 */
.closing-actions .sales-pos-button,
.closing-confirmed-banner .sales-pos-button {
	width: auto;
}

/* Cancelling is destructive and must not look like confirming. There was no
   danger variant of this button; the only other red control in the module is
   .sales-invoice-icon-button.is-danger, and this matches it. */
.sales-pos-button.is-danger {
	color: #fff !important;
	background: #c62828 !important;
}

.sales-pos-button.is-danger:hover {
	background: #a01f1f !important;
}

/* ---- Closing stock takings ---------------------------------------------
 *
 * Confirming a count recognises the sale against the receivable; this is where
 * it is said how the money arrived, and what is still owed.
 */

.closing-takings {
	margin: 0 18px 16px;
	padding: 16px;
	border: 1px solid #dbe3e7;
	border-radius: 5px;
	background: #fbfdfd;
}

.closing-takings-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 12px;
}

.closing-takings-head h3 {
	margin: 0;
	font-size: 16px;
}

.closing-takings-figures {
	display: flex;
	gap: 18px;
}

.closing-takings-figures span {
	display: block;
	color: #607d8b;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
}

.closing-takings-figures strong {
	font-size: 17px;
	font-variant-numeric: tabular-nums;
}

/* Outstanding is the number that needs acting on, so it is the one in colour. */
.closing-takings-figures .is-due strong {
	color: #a64b00;
}

.closing-takings-form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid #e3e8eb;
}

.closing-takings-form label {
	display: block;
	min-width: 170px;
}

.closing-takings-form label span {
	display: block;
	margin-bottom: 6px;
	color: #37474f;
	font-size: 13px;
	font-weight: 700;
}

.closing-takings-form .w3-input {
	min-height: 42px;
	border: 1px solid #b0bec5 !important;
	border-radius: 4px;
}

.closing-takings-form .sales-pos-button {
	width: auto;
}

/* Which basis the posting's figures are on: live, or as booked. */
.closing-basis {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 18px 10px;
	color: #607d8b;
	font-size: 12px;
}
