/*
 * Mpoulakis CMS — Global Styles
 * ==================================================================
 * Every screen's root element has the class .mcms-wrap. All styles
 * are scoped under it, so the theme/Elementor can't break our UI and
 * our UI can't leak into the rest of the site. Modals and toasts are
 * placed in their own .mcms-wrap layer on <body>, so they get the
 * same styles.
 *
 * SECTIONS
 *   1. Design tokens (colors, type, spacing) — CHANGE LOOKS HERE
 *   2. Dark mode slot (ready for later)
 *   3. Base + theme reset
 *   4. Page layout: top bar, page body
 *   5. Buttons
 *   6. Form fields
 *   7. Cards, detail rows, sections
 *   8. Badges and the license plate
 *   9. Lists (rows, infinite scroll status)
 *  10. Search bar
 *  11. Modal
 *  12. Toast
 *  13. Spinner, skeleton, empty states, notices
 *  14. Accessibility (focus, reduced motion)
 *  15. Customer picker
 *  16. On/off switch
 *  17. Chips
 *  18. Checkbox row
 *  19. Password field with eye button
 *  20. Contact bar (copy / call / Viber / WhatsApp / SMS)
 *  21. Quick context in the top bar (customer + vehicle chips)
 *  22. Quick sheets (contact sheet, vehicle sheet frame)
 *  23. Copy rows, copy buttons, monospace, soft warnings
 *  24. Kilometres line, notes copy button, header reminder badge
 * ================================================================== */

/* ==================================================================
   1. DESIGN TOKENS
   Every color in the UI comes from these. Names describe the ROLE
   (surface, text, accent), not the color, so dark mode only has to
   reassign them.
   ================================================================== */
:root {
	/* Brand */
	--mcms-brand:            #3EBC21; /* the client's green: accents, badges, focus */
	--mcms-brand-strong:     #237F10; /* buttons with white text (5.1:1 contrast) */
	--mcms-brand-strong-hover: #1C6A0C;
	--mcms-brand-soft:       #E7F6E2; /* tinted backgrounds */
	--mcms-brand-softer:     #F2FAEF;
	--mcms-on-brand:         #FFFFFF; /* text on --mcms-brand-strong */

	/* Neutrals */
	--mcms-bg:               #F4F6F3; /* page background, faint green-grey */
	--mcms-surface:          #FFFFFF; /* cards, inputs, modals */
	--mcms-surface-muted:    #F7F8F6; /* subtle areas inside cards */
	--mcms-text:             #202020;
	--mcms-text-muted:       #626A60;
	--mcms-line:             #E2E6E0;
	--mcms-line-strong:      #C9CFC6;

	/* States */
	--mcms-danger:           #B42318;
	--mcms-danger-soft:      #FDECEA;
	--mcms-warning:          #8A5300;
	--mcms-warning-soft:     #FFF3DC;
	--mcms-info:             #1F4FA3; /* also the plate's GR strip */

	/* Type — the device's own font: no download, perfect Greek. */
	--mcms-font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
	--mcms-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	--mcms-text-xs:  12px;
	--mcms-text-sm:  14px;
	--mcms-text-md:  16px; /* 16px on inputs stops iPhone zooming in */
	--mcms-text-lg:  19px;
	--mcms-text-xl:  24px;

	/* Shape and depth */
	--mcms-radius-sm:   8px;
	--mcms-radius-md:   12px;
	--mcms-radius-lg:   18px;
	--mcms-shadow:      0 1px 2px rgba(32, 32, 32, .06);
	--mcms-shadow-pop:  0 12px 40px rgba(32, 32, 32, .18);

	/* Spacing and sizes */
	--mcms-gap:         12px;
	--mcms-pad:         16px;
	--mcms-tap:         44px;  /* minimum touch target */
	--mcms-max-width:   760px;
	--mcms-ease:        .18s ease;
}

/* ==================================================================
   2. DARK MODE SLOT
   Later: add data-mcms-theme="dark" on <html> and fill in the tokens.
   Nothing else in the CSS needs to change.
   ================================================================== */
/*
:root[data-mcms-theme="dark"] {
	--mcms-bg:          #141614;
	--mcms-surface:     #1E211D;
	--mcms-text:        #EEF1EC;
	...
}
*/

/* ==================================================================
   3. BASE + THEME RESET
   Neutralise whatever the theme does to links, buttons, inputs and
   headings inside our screens.
   ================================================================== */
.mcms-wrap {
	font-family: var(--mcms-font);
	font-size: var(--mcms-text-sm);
	line-height: 1.5;
	color: var(--mcms-text);
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
}

.mcms-wrap *,
.mcms-wrap *::before,
.mcms-wrap *::after {
	box-sizing: border-box;
}

.mcms-wrap a,
.mcms-wrap a:hover,
.mcms-wrap a:focus,
.mcms-wrap a:visited {
	text-decoration: none;
	box-shadow: none;
}

/* Plain links take the surrounding text color.
   Written with :where() + the doubled class on purpose: this rule must be
   strong enough to beat the theme's own link colors (e.g. a:visited), but
   WEAKER than any of our components (buttons, tiles, home button…), so a
   visited link can never lose its color again. (Before, ":visited" made it
   stronger and visited buttons/tiles turned black.) */
.mcms-wrap.mcms-wrap :where(a, a:hover, a:focus, a:visited) {
	color: inherit;
}

.mcms-wrap h1,
.mcms-wrap h2,
.mcms-wrap h3,
.mcms-wrap p {
	margin: 0;
	padding: 0;
	font-family: inherit;
	color: inherit;
	letter-spacing: normal;
	text-transform: none;
}

.mcms-wrap button {
	font-family: inherit;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	text-shadow: none;
	min-height: 0;
	line-height: 1.2;
}

.mcms-wrap [hidden] {
	display: none !important;
}

/* Numbers that should line up (money, phones, IDs). */
.mcms-num {
	font-variant-numeric: tabular-nums;
}

/* ==================================================================
   4. PAGE LAYOUT
   .mcms-page        the screen
   .mcms-topbar      sticky header: back link, title, main action
   .mcms-page__body  the content
   ================================================================== */
.mcms-page {
	max-width: var(--mcms-max-width);
	margin: 0 auto;
	padding: 0 0 48px;
}

/*
 * The top bar spans the FULL width of the screen (edge to edge, past the
 * theme's/Elementor's page margins), while its content stays lined up
 * with the page column:
 *   width 100vw + negative margins pull the bar out to the screen edges,
 *   the matching padding pushes its content back in line.
 * body.mcms-app { overflow-x: clip } (section 4b) stops the 100vw from
 * causing a sideways scrollbar; "clip" (unlike "hidden") keeps the bar sticky.
 */
.mcms-topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: var(--mcms-gap);
	min-height: 60px;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: 10px calc(50vw - 50% + var(--mcms-pad));
	box-sizing: border-box;
	background: var(--mcms-surface);
	border-bottom: 1px solid var(--mcms-line);
	transition: box-shadow var(--mcms-ease);
}

.mcms-topbar.is-stuck {
	box-shadow: 0 2px 8px rgba(32, 32, 32, .06);
}

/* Home button next to "back" on inside pages (MCMS.homeButton). */
.mcms-wrap .mcms-home-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	margin-left: -6px;
	border-radius: var(--mcms-radius-sm);
	background: var(--mcms-brand-softer);
	border: 1px solid var(--mcms-brand-soft);
	color: var(--mcms-brand-strong);
}

.mcms-wrap .mcms-home-btn:hover {
	background: var(--mcms-brand-soft);
	color: var(--mcms-brand-strong);
}

.mcms-home-btn svg {
	width: 20px;
	height: 20px;
}

/* ==================================================================
   4b. PAGE-LEVEL: stops the full-width top bar from causing a sideways
   scrollbar. The class is added to <body> only on pages of the system
   (shared/assets.php).
   ================================================================== */
body.mcms-app {
	overflow-x: clip;
}

.mcms-topbar__title {
	flex: 1;
	min-width: 0;
	font-size: var(--mcms-text-lg);
	font-weight: 700;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* A title that appears only once the page has scrolled — used when
   the page already shows the same name in large type below. */
.mcms-topbar__title--on-scroll {
	opacity: 0;
	transition: opacity var(--mcms-ease);
}

.mcms-topbar.is-stuck .mcms-topbar__title--on-scroll {
	opacity: 1;
}

.mcms-back {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: var(--mcms-tap);
	padding: 0 8px 0 2px;
	margin-left: -4px;
	border-radius: var(--mcms-radius-sm);
	font-weight: 600;
	color: var(--mcms-brand-strong) !important;
	white-space: nowrap;
}

.mcms-back svg {
	width: 20px;
	height: 20px;
}

.mcms-page__body {
	display: flex;
	flex-direction: column;
	gap: var(--mcms-gap);
	padding: 4px var(--mcms-pad) 0;
}

/* ==================================================================
   5. BUTTONS
   .mcms-btn              base (neutral, outlined)
   .mcms-btn--primary     main action, deep green with white text
   .mcms-btn--danger      destructive
   .mcms-btn--ghost       text-only
   .mcms-btn--block       full width
   .mcms-btn--icon        square icon button
   ================================================================== */
.mcms-wrap .mcms-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: var(--mcms-tap);
	padding: 0 16px;
	margin: 0;
	border: 1.5px solid #A9B2A6;
	border-radius: var(--mcms-radius-sm);
	background: var(--mcms-surface);
	color: var(--mcms-text);
	font-size: var(--mcms-text-sm);
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	text-decoration: none;
	transition: background var(--mcms-ease), border-color var(--mcms-ease), opacity var(--mcms-ease);
}

.mcms-wrap .mcms-btn:hover {
	background: var(--mcms-surface-muted);
	color: var(--mcms-text);
}

.mcms-wrap .mcms-btn:disabled {
	opacity: .45;
	cursor: not-allowed;
}

.mcms-wrap .mcms-btn svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.mcms-wrap .mcms-btn--primary {
	background: var(--mcms-brand-strong);
	border-color: var(--mcms-brand-strong);
	color: var(--mcms-on-brand);
}

.mcms-wrap .mcms-btn--primary:hover:not(:disabled) {
	background: var(--mcms-brand-strong-hover);
	border-color: var(--mcms-brand-strong-hover);
	color: var(--mcms-on-brand);
}

.mcms-wrap .mcms-btn--danger {
	background: var(--mcms-surface);
	border-color: rgba(180, 35, 24, .45);
	color: var(--mcms-danger);
}

.mcms-wrap .mcms-btn--danger:hover:not(:disabled) {
	background: var(--mcms-danger-soft);
	color: var(--mcms-danger);
}

.mcms-wrap .mcms-btn--danger-solid {
	background: var(--mcms-danger);
	border-color: var(--mcms-danger);
	color: #fff;
}

.mcms-wrap .mcms-btn--danger-solid:hover:not(:disabled) {
	background: #8F1B12;
	color: #fff;
}

/* Secondary action (+ Όχημα, Αλλαγή, + Πληρωμή…): soft green fill so it
   clearly reads as a button, while staying quieter than the primary. */
.mcms-wrap .mcms-btn--ghost {
	background: var(--mcms-brand-softer);
	border-color: var(--mcms-brand-soft);
	color: var(--mcms-brand-strong);
}

.mcms-wrap .mcms-btn--ghost:hover:not(:disabled) {
	background: var(--mcms-brand-soft);
	border-color: var(--mcms-brand);
	color: var(--mcms-brand-strong);
}

/* Icon-only ghost buttons in modal headers (the X) stay plain. */
.mcms-wrap .mcms-modal__head .mcms-btn--ghost {
	background: transparent;
	border-color: transparent;
}

.mcms-wrap .mcms-btn--block {
	width: 100%;
}

.mcms-wrap .mcms-btn--icon {
	width: var(--mcms-tap);
	padding: 0;
}

/* Text hidden on phones, shown from tablets up (icon stays). */
@media (max-width: 480px) {
	.mcms-wrap .mcms-btn__label-wide {
		display: none;
	}
}

/* ==================================================================
   6. FORM FIELDS
   .mcms-form           vertical stack of fields
   .mcms-field          label + control + help + error
   .mcms-input          text, tel, email, number, select, textarea
   .mcms-segmented      two/three-option toggle (e.g. Λιανικής/Χονδρικής)
   ================================================================== */
.mcms-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.mcms-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.mcms-field__label {
	font-size: var(--mcms-text-sm);
	font-weight: 600;
	color: var(--mcms-text);
}

.mcms-field__req {
	color: var(--mcms-danger);
	margin-left: 2px;
}

.mcms-field__help {
	font-size: var(--mcms-text-xs);
	color: var(--mcms-text-muted);
}

.mcms-field__error {
	font-size: var(--mcms-text-xs);
	font-weight: 600;
	color: var(--mcms-danger);
}

.mcms-wrap .mcms-input {
	display: block;
	width: 100%;
	min-height: var(--mcms-tap);
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var(--mcms-line-strong);
	border-radius: var(--mcms-radius-sm);
	background: var(--mcms-surface);
	color: var(--mcms-text);
	font-family: var(--mcms-font);
	font-size: var(--mcms-text-md);
	line-height: 1.35;
	box-shadow: none;
	outline: none;
	transition: border-color var(--mcms-ease), box-shadow var(--mcms-ease);
	-webkit-appearance: none;
	appearance: none;
}

.mcms-wrap .mcms-input:focus {
	border-color: var(--mcms-brand-strong);
	box-shadow: 0 0 0 3px var(--mcms-brand-soft);
}

.mcms-wrap .mcms-input::placeholder {
	color: var(--mcms-text-muted);
	opacity: .8;
}

.mcms-wrap .mcms-input.is-invalid {
	border-color: var(--mcms-danger);
}

.mcms-wrap textarea.mcms-input {
	min-height: 96px;
	resize: vertical;
}

.mcms-wrap select.mcms-input {
	padding-right: 36px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23626A60' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 18px;
}

.mcms-segmented {
	display: flex;
	padding: 3px;
	gap: 3px;
	border-radius: var(--mcms-radius-sm);
	background: var(--mcms-surface-muted);
	border: 1px solid var(--mcms-line);
}

.mcms-wrap .mcms-segmented__opt {
	flex: 1;
	min-height: 38px;
	padding: 0 10px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--mcms-text-muted);
	font-size: var(--mcms-text-sm);
	font-weight: 600;
	cursor: pointer;
}

.mcms-wrap .mcms-segmented__opt[aria-pressed="true"] {
	background: var(--mcms-surface);
	color: var(--mcms-text);
	box-shadow: var(--mcms-shadow), 0 0 0 1px var(--mcms-line);
}

/* Two fields side by side on wider screens, stacked on phones. */
.mcms-form__row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

@media (min-width: 560px) {
	.mcms-form__row {
		grid-template-columns: 1fr 1fr;
	}
}

/* ==================================================================
   7. CARDS, DETAIL ROWS, SECTIONS
   ================================================================== */
.mcms-card {
	background: var(--mcms-surface);
	border: 1px solid var(--mcms-line);
	border-radius: var(--mcms-radius-md);
	box-shadow: var(--mcms-shadow);
}

.mcms-card__body {
	padding: var(--mcms-pad);
}

.mcms-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--mcms-gap);
	margin-top: 8px;
}

.mcms-section-head__title {
	font-size: var(--mcms-text-md);
	font-weight: 700;
}

/* Label/value pairs on a details card. */
.mcms-details {
	display: grid;
	grid-template-columns: 1fr;
	margin: 0;
}

.mcms-details__row {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 10px;
	padding: 11px var(--mcms-pad);
	border-top: 1px solid var(--mcms-line);
	align-items: baseline;
}

.mcms-details__row:first-child {
	border-top: 0;
}

.mcms-details__label {
	color: var(--mcms-text-muted);
	font-size: var(--mcms-text-sm);
}

.mcms-details__value {
	font-size: var(--mcms-text-md);
	overflow-wrap: anywhere;
	white-space: pre-wrap;
	margin: 0;
}

.mcms-details__value a {
	color: var(--mcms-brand-strong) !important;
	font-weight: 600;
}

.mcms-details__empty {
	color: var(--mcms-text-muted);
}

/* Action bar at the bottom of a card (Edit / Trash, Cancel / Save).
   Buttons share the width on phones, sit right on wider screens. */
.mcms-card-actions {
	display: flex;
	gap: 8px;
	padding: 12px var(--mcms-pad);
	border-top: 1px solid var(--mcms-line);
	background: var(--mcms-surface-muted);
	border-radius: 0 0 var(--mcms-radius-md) var(--mcms-radius-md);
}

.mcms-card-actions .mcms-btn {
	flex: 1 1 auto;
}

/* Wrap onto a second line instead of overflowing on very narrow phones. */
.mcms-card-actions {
	flex-wrap: wrap;
}

@media (min-width: 560px) {
	.mcms-card-actions {
		justify-content: flex-end;
	}
	.mcms-card-actions .mcms-btn {
		flex: 0 0 auto;
	}
}

/* ==================================================================
   8. BADGES AND THE LICENSE PLATE
   ================================================================== */
.mcms-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: var(--mcms-text-xs);
	font-weight: 700;
	line-height: 1.5;
	white-space: nowrap;
}

.mcms-badge--brand   { background: var(--mcms-brand-soft);   color: var(--mcms-brand-strong); }
.mcms-badge--neutral { background: var(--mcms-surface-muted); color: var(--mcms-text-muted); border: 1px solid var(--mcms-line); }
.mcms-badge--warning { background: var(--mcms-warning-soft); color: var(--mcms-warning); }
.mcms-badge--danger  { background: var(--mcms-danger-soft);  color: var(--mcms-danger); }

/*
 * The license plate — drawn like a real Greek plate: white plate,
 * dark border, blue EU strip with "GR" on the left. Staff spot a
 * car by its plate faster than by any other detail.
 */
.mcms-plate {
	display: inline-flex;
	align-items: stretch;
	height: 24px;
	border: 1.5px solid var(--mcms-text);
	border-radius: 4px;
	background: #fff;
	color: #111;
	overflow: hidden;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .06em;
	line-height: 1;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.mcms-plate::before {
	content: "GR";
	display: flex;
	align-items: flex-end;
	justify-content: center;
	width: 13px;
	padding-bottom: 2px;
	background: var(--mcms-info);
	color: #fff;
	font-size: 6px;
	font-weight: 700;
	letter-spacing: 0;
}

.mcms-plate__text {
	display: flex;
	align-items: center;
	padding: 0 6px;
}

/* A car with no plate on file. */
.mcms-plate--none {
	border-style: dashed;
	border-color: var(--mcms-line-strong);
	color: var(--mcms-text-muted);
	font-weight: 600;
	letter-spacing: 0;
}

.mcms-plate--none::before {
	background: var(--mcms-line-strong);
}

/* ==================================================================
   9. LISTS
   .mcms-list         container of rows
   .mcms-row          one tappable row (a link)
   .mcms-list-status  "loading…", "no more", errors under the list
   ================================================================== */
.mcms-list {
	display: flex;
	flex-direction: column;
	background: var(--mcms-surface);
	border: 1px solid var(--mcms-line);
	border-radius: var(--mcms-radius-md);
	box-shadow: var(--mcms-shadow);
	overflow: hidden;
}

.mcms-list:empty {
	display: none;
}

.mcms-wrap .mcms-row {
	display: flex;
	align-items: center;
	gap: var(--mcms-gap);
	padding: 14px var(--mcms-pad);
	border-top: 1px solid var(--mcms-line);
	color: var(--mcms-text);
	transition: background var(--mcms-ease);
}

.mcms-wrap .mcms-row:first-child {
	border-top: 0;
}

.mcms-wrap .mcms-row:hover {
	background: var(--mcms-surface-muted);
}

.mcms-wrap .mcms-row:active {
	background: var(--mcms-brand-softer);
}

.mcms-row__main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.mcms-row__title {
	font-size: var(--mcms-text-md);
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mcms-row__sub {
	color: var(--mcms-text-muted);
	font-size: var(--mcms-text-sm);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mcms-row__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: 2px;
}

.mcms-row__side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	flex-shrink: 0;
}

.mcms-row__chevron {
	width: 18px;
	height: 18px;
	color: var(--mcms-line-strong);
	flex-shrink: 0;
}

.mcms-list-status {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	color: var(--mcms-text-muted);
	font-size: var(--mcms-text-sm);
	text-align: center;
}

.mcms-list-status:empty {
	min-height: 0;
}

.mcms-sentinel {
	height: 1px;
}

/* ==================================================================
  10. SEARCH BAR
   ================================================================== */
.mcms-search {
	position: relative;
}

.mcms-search__icon {
	position: absolute;
	left: 13px;
	top: 50%;
	width: 20px;
	height: 20px;
	transform: translateY(-50%);
	color: var(--mcms-text-muted);
	pointer-events: none;
}

.mcms-wrap .mcms-search .mcms-input {
	min-height: 50px;
	padding-left: 42px;
	padding-right: 44px;
	border-radius: var(--mcms-radius-md);
	font-size: var(--mcms-text-md);
}

.mcms-wrap .mcms-search__clear {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: var(--mcms-radius-sm);
	background: transparent;
	color: var(--mcms-text-muted);
	cursor: pointer;
}

.mcms-search__clear svg {
	width: 18px;
	height: 18px;
}

.mcms-search__hint {
	padding: 0 4px;
	font-size: var(--mcms-text-xs);
	color: var(--mcms-text-muted);
}

/* ==================================================================
  11. MODAL
   Bottom sheet on phones, centered dialog on larger screens.
   Built by MCMS.modal() in mcms-core.js.
   ================================================================== */
.mcms-layer {
	position: relative;
	z-index: 100000;
}

.mcms-modal {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgba(32, 32, 32, .45);
	opacity: 0;
	transition: opacity var(--mcms-ease);
}

.mcms-modal.is-open {
	opacity: 1;
}

.mcms-modal__panel {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-height: 92vh;
	max-height: 92dvh;
	background: var(--mcms-surface);
	border-radius: var(--mcms-radius-lg) var(--mcms-radius-lg) 0 0;
	box-shadow: var(--mcms-shadow-pop);
	transform: translateY(24px);
	transition: transform var(--mcms-ease);
	will-change: transform; /* own layer: a sheet over a sheet slides in without jitter */
}

.mcms-modal.is-open .mcms-modal__panel {
	transform: none;
}

@media (min-width: 640px) {
	.mcms-modal {
		align-items: center;
		padding: 24px;
	}
	.mcms-modal__panel {
		max-width: 520px;
		max-height: calc(100vh - 48px);   /* never taller than the space between the paddings */
		max-height: calc(100dvh - 48px);
		border-radius: var(--mcms-radius-lg);
	}
}

.mcms-modal__head {
	display: flex;
	align-items: center;
	gap: var(--mcms-gap);
	padding: 14px 8px 10px var(--mcms-pad);
	border-bottom: 1px solid var(--mcms-line);
}

.mcms-modal__title {
	flex: 1;
	font-size: var(--mcms-text-lg);
	font-weight: 700;
}

.mcms-modal__body {
	padding: var(--mcms-pad);
	overflow-y: auto;
	overscroll-behavior: contain; /* scrolling the sheet never drags the page or the sheet below */
	-webkit-overflow-scrolling: touch;
}

.mcms-modal__foot {
	display: flex;
	gap: 8px;
	padding: 12px var(--mcms-pad);
	padding-bottom: max(12px, env(safe-area-inset-bottom));
	border-top: 1px solid var(--mcms-line);
}

.mcms-modal__foot .mcms-btn {
	flex: 1;
}

/* Prefixed with .mcms-wrap so it beats the base reset of p margins. */
.mcms-wrap .mcms-modal__text {
	font-size: var(--mcms-text-md);
	margin-bottom: 12px;
}

/* The name the user must type to confirm a trash. */
.mcms-confirm-word {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 6px;
	background: var(--mcms-danger-soft);
	color: var(--mcms-danger);
	font-weight: 800;
	user-select: all;
}

/* Prevent the page behind a modal from scrolling. */
body.mcms-modal-open {
	overflow: hidden;
}

/* ==================================================================
  12. TOAST
   ================================================================== */
.mcms-toast {
	position: fixed;
	left: 50%;
	bottom: max(20px, env(safe-area-inset-bottom));
	max-width: calc(100vw - 32px);
	width: max-content;
	padding: 12px 18px;
	border-radius: var(--mcms-radius-md);
	background: var(--mcms-text);
	color: #fff;
	font-size: var(--mcms-text-sm);
	font-weight: 600;
	text-align: center;
	box-shadow: var(--mcms-shadow-pop);
	opacity: 0;
	transform: translate(-50%, 12px);
	transition: opacity var(--mcms-ease), transform var(--mcms-ease);
	pointer-events: none;
	z-index: 100001;
}

.mcms-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

.mcms-toast--success { background: var(--mcms-brand-strong); }
.mcms-toast--error   { background: var(--mcms-danger); }
.mcms-toast--warning { background: var(--mcms-warning); } /* saved, but check something (e.g. a VIN that isn't 17 characters) */

/* ==================================================================
  13. SPINNER, SKELETON, EMPTY STATES, NOTICES
   ================================================================== */
/*
 * Whole-pixel size and border (24px / 3px): a 22px circle with a 2.5px
 * border has no exact centre on a desktop screen, so it wobbled while it
 * turned. will-change puts it on its own layer, so it keeps turning
 * smoothly while the page is busy drawing what just loaded.
 */
.mcms-spinner {
	box-sizing: border-box;
	width: 24px;
	height: 24px;
	border: 3px solid var(--mcms-line);
	border-top-color: var(--mcms-brand);
	border-radius: 50%;
	animation: mcms-spin .75s linear infinite;
	will-change: transform;
	backface-visibility: hidden;
	flex-shrink: 0;
}

@keyframes mcms-spin {
	from { transform: rotate(0deg) translateZ(0); }
	to   { transform: rotate(360deg) translateZ(0); }
}

.mcms-loading {
	display: flex;
	justify-content: center;
	padding: 48px 0;
}

.mcms-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 40px 24px;
	text-align: center;
	color: var(--mcms-text-muted);
	font-size: var(--mcms-text-md);
}

.mcms-notice {
	max-width: var(--mcms-max-width);
	margin: 24px auto;
	padding: var(--mcms-pad);
	border-radius: var(--mcms-radius-md);
	background: var(--mcms-surface);
	border: 1px solid var(--mcms-line);
	text-align: center;
}

.mcms-notice a {
	color: var(--mcms-brand-strong) !important;
	font-weight: 700;
}

.mcms-error-box {
	padding: 12px 14px;
	border-radius: var(--mcms-radius-sm);
	background: var(--mcms-danger-soft);
	color: var(--mcms-danger);
	font-weight: 600;
}

/* ==================================================================
  14. ACCESSIBILITY
   ================================================================== */
.mcms-wrap :focus-visible {
	outline: 2px solid var(--mcms-brand-strong);
	outline-offset: 2px;
}

.mcms-wrap .mcms-input:focus-visible {
	outline: none; /* inputs show focus with border + ring instead */
}

.mcms-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.mcms-wrap *,
	.mcms-wrap *::before,
	.mcms-wrap *::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}

/* ==================================================================
  15. CUSTOMER PICKER (MCMS.pickCustomer in mcms-core.js)
   ================================================================== */
.mcms-picker {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mcms-wrap .mcms-picker__row {
	width: 100%;
	margin: 0;
	border: 0;
	border-top: 1px solid var(--mcms-line);
	border-radius: 0;
	background: var(--mcms-surface);
	text-align: left;
	font: inherit;
	cursor: pointer;
}

.mcms-wrap .mcms-picker__row:first-child {
	border-top: 0;
}

.mcms-picker__new {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px;
	border-radius: var(--mcms-radius-sm);
	background: var(--mcms-surface-muted);
	border: 1px solid var(--mcms-line);
}

.mcms-picker .mcms-list-status:empty {
	display: none;
}

/* ==================================================================
  16. ON/OFF SWITCH (MCMS.form type 'toggle')
   ================================================================== */
.mcms-wrap .mcms-switch {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;   /* inside a form field (a flex column) it would stretch the */
	max-width: max-content;   /* whole line: only the switch + its words may be tapped    */
	gap: 10px;
	min-height: var(--mcms-tap);
	cursor: pointer;
	margin: 0;
	font-size: var(--mcms-text-md);
	font-weight: 600;
}

.mcms-switch__input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.mcms-switch__track {
	position: relative;
	width: 44px;
	height: 26px;
	border-radius: 26px;
	background: var(--mcms-line-strong);
	flex-shrink: 0;
	transition: background var(--mcms-ease);
}

.mcms-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(32, 32, 32, .25);
	transition: transform var(--mcms-ease);
}

.mcms-switch__input:checked + .mcms-switch__track {
	background: var(--mcms-brand-strong);
}

.mcms-switch__input:checked + .mcms-switch__track::after {
	transform: translateX(18px);
}

.mcms-switch__input:focus-visible + .mcms-switch__track {
	outline: 2px solid var(--mcms-brand-strong);
	outline-offset: 2px;
}

/* ==================================================================
  17. CHIPS (tap-to-pick options: Πηγή, periods, trash types…)
   ================================================================== */
.mcms-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mcms-wrap .mcms-chip {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 14px;
	margin: 0;
	border: 1px solid var(--mcms-line-strong);
	border-radius: 999px;
	background: var(--mcms-surface);
	color: var(--mcms-text);
	font-size: var(--mcms-text-sm);
	font-weight: 600;
	cursor: pointer;
}

.mcms-wrap .mcms-chip:hover {
	border-color: var(--mcms-brand);
	background: var(--mcms-surface);
	color: var(--mcms-text);
}

.mcms-wrap .mcms-chip[aria-pressed="true"] {
	background: var(--mcms-brand-strong);
	border-color: var(--mcms-brand-strong);
	color: var(--mcms-on-brand);
}

.mcms-chip__sub {
	font-weight: 400;
	opacity: .75;
	margin-left: 4px;
}

/* ==================================================================
  18. CHECKBOX ROW (label + checkbox)
   ================================================================== */
.mcms-wrap .mcms-check {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: var(--mcms-tap);
	font-size: var(--mcms-text-md);
	font-weight: 600;
	cursor: pointer;
	margin: 0;
}

.mcms-wrap .mcms-check__input {
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--mcms-brand-strong);
	cursor: pointer;
}

/* ==================================================================
  19. PASSWORD FIELD WITH EYE BUTTON (profile, login)
   ================================================================== */
.mcms-pw {
	position: relative;
}

.mcms-wrap .mcms-pw .mcms-input {
	padding-right: 48px;
}

.mcms-wrap .mcms-pw__eye {
	position: absolute;
	right: 2px;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: var(--mcms-radius-sm);
	background: transparent;
	color: var(--mcms-text-muted);
	cursor: pointer;
}

.mcms-wrap .mcms-pw__eye:hover {
	color: var(--mcms-brand-strong);
	background: transparent;
}

/* ==================================================================
  20. CONTACT BAR (MCMS.contactBar in mcms-core.js)
   The number + Αντιγραφή · Κλήση · Viber · WhatsApp · SMS.
   Buttons wrap onto a second line on narrow phones.
   ================================================================== */
.mcms-contact {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mcms-contact__number {
	font-size: var(--mcms-text-lg);
	font-weight: 700;
	letter-spacing: .02em;
	user-select: all;
}

/*
 * Layout follows the space the bar REALLY has (a container query), not the
 * screen width: inside a sheet or a card on a desktop the bar is ~450px
 * wide, and five buttons with icons + words don't fit (SMS used to stick
 * out). So:
 *   < 300px   2 per row, words only        (very small phones)
 *   ≥ 300px   3 per row, words only        (phones, narrow sheets)
 *   ≥ 430px   all 5 in one row, words only (sheets/cards on desktop)
 *   ≥ 600px   all 5 in one row, icon + word
 * minmax(0, 1fr) lets a cell shrink below its text width instead of overflowing.
 * Browsers without container queries keep the 3-per-row layout (always fits).
 */
.mcms-contact {
	container-type: inline-size;
}

.mcms-contact__actions {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
}

.mcms-wrap .mcms-contact__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	width: 100%;
	min-width: 0;
	min-height: 40px;
	padding: 0 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0;
	border-radius: 999px;
	border: 1.5px solid var(--mcms-line-strong);
	background: var(--mcms-surface);
	color: var(--mcms-text);
	font-family: var(--mcms-font);
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.mcms-contact__btn svg {
	width: 16px;
	height: 16px;
}

/* Icons only where there is room for them (see the table above). */
.mcms-contact__btn > span[aria-hidden="true"] {
	display: none !important;
}

.mcms-wrap .mcms-contact__btn:hover {
	background: var(--mcms-surface-muted);
}

@container (max-width: 299px) {
	.mcms-contact__actions {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@container (min-width: 430px) {
	.mcms-contact__actions {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

@container (min-width: 600px) {
	.mcms-wrap .mcms-contact__btn {
		padding: 0 10px;
		font-size: var(--mcms-text-sm);
	}
	.mcms-contact__btn > span[aria-hidden="true"] {
		display: inline-flex !important;
	}
}

/* App colors on the text/icon only, so they stay readable on white. */
.mcms-wrap .mcms-contact__btn--call     { color: var(--mcms-brand-strong); border-color: var(--mcms-brand-soft); background: var(--mcms-brand-softer); }
.mcms-wrap .mcms-contact__btn--viber    { color: #6B4EBF; border-color: #D9D0F2; }
.mcms-wrap .mcms-contact__btn--whatsapp { color: #0F7A41; border-color: #C7E8D5; }
.mcms-wrap .mcms-contact__btn--sms      { color: var(--mcms-info); border-color: #CCDAF2; }

/* ==================================================================
  21. QUICK CONTEXT IN THE TOP BAR (MCMS.contextBar in mcms-core.js)
   ← ⌂  Παραγγελία #213
        [👤 Γ. Παπαδόπουλος] [GR IKY-1234]
   The customer chip shrinks (name cut with "…"); the plate never does.
   On phones the back link keeps only its arrow, so both chips fit on
   a 360px screen.
   ================================================================== */
.mcms-ctx {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.mcms-ctx__label {
	font-size: var(--mcms-text-xs);
	font-weight: 700;
	line-height: 1.2;
	color: var(--mcms-text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mcms-ctx__chips {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.mcms-wrap .mcms-ctx__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 34px;
	min-width: 0;
	max-width: 100%;
	padding: 0 12px 0 9px;
	margin: 0;
	border: 1.5px solid var(--mcms-line-strong);
	border-radius: 999px;
	background: var(--mcms-surface);
	color: var(--mcms-text);
	font-family: var(--mcms-font);
	font-size: var(--mcms-text-sm);
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color var(--mcms-ease), background var(--mcms-ease);
}

.mcms-wrap button.mcms-ctx__chip:hover {
	border-color: var(--mcms-brand);
	background: var(--mcms-brand-softer);
	color: var(--mcms-text);
}

.mcms-wrap span.mcms-ctx__chip {
	cursor: default;
}

.mcms-ctx__chip svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: var(--mcms-brand-strong);
}

.mcms-wrap .mcms-ctx__chip--customer {
	flex: 0 1 auto;
}

.mcms-ctx__text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* The plate chip: the plate itself inside a thin frame. Never shrinks. */
.mcms-wrap .mcms-ctx__chip--vehicle {
	flex: 0 0 auto;
	padding: 0 5px;
	border-radius: var(--mcms-radius-sm);
}

.mcms-wrap .mcms-ctx__chip--vehicle.is-deleted {
	padding: 0 10px;
	border-color: rgba(180, 35, 24, .35);
	background: var(--mcms-danger-soft);
	color: var(--mcms-danger);
	font-size: var(--mcms-text-xs);
}

.mcms-wrap .mcms-ctx__chip--add {
	flex: 0 0 auto;
	border-style: dashed;
	color: var(--mcms-brand-strong);
	font-weight: 600;
}

@media (max-width: 480px) {
	.mcms-topbar.mcms-topbar--ctx {
		gap: 8px;
	}
	/* Arrow only: the text is still read by screen readers. */
	.mcms-wrap .mcms-topbar--ctx .mcms-back {
		font-size: 0;
		gap: 0;
		min-width: 36px;
		padding: 0 4px;
	}
	.mcms-wrap .mcms-topbar--ctx .mcms-home-btn {
		width: 36px;
		height: 36px;
		margin-left: 0;
	}
	.mcms-wrap .mcms-ctx__chip {
		padding: 0 10px 0 8px;
	}
}

/* ==================================================================
  22. QUICK SHEETS (MCMS.contactSheet, MCMS.vehicles.sheet)
   Phones: the usual bottom sheet. Wider screens: a panel just under
   the top bar, where the chip that opened it is.
   ================================================================== */
@media (min-width: 640px) {
	/* Centred in the space below the top bar, with room at the bottom, so
	   the footer buttons never reach the screen edge / taskbar. A tall
	   sheet scrolls inside (body), the footer always stays visible. */
	.mcms-modal.mcms-modal--sheet {
		align-items: center;
		padding: 76px 24px 40px;
	}
	.mcms-modal--sheet .mcms-modal__panel {
		max-height: calc(100vh - 116px);
		max-height: calc(100dvh - 116px);
	}
}

/* Vehicle sheet: three footer buttons don't fit one row (phone, and the
   520px desktop panel) → Επεξεργασία + Αλλαγή οχήματος side by side,
   Σελίδα οχήματος full width below. Only when there are exactly three
   (edit mode has two). */
.mcms-modal--vsheet .mcms-modal__foot {
	flex-wrap: wrap;
}

.mcms-modal--vsheet .mcms-modal__foot .mcms-btn {
	padding: 0 8px;
}

.mcms-modal--vsheet .mcms-modal__foot .mcms-btn:nth-child(3):last-child {
	flex-basis: 100%;
}

/* Very narrow phones: drop the icons so the first two still share a row. */
@media (max-width: 399px) {
	.mcms-modal--vsheet .mcms-modal__foot .mcms-btn:nth-child(-n+2) svg {
		display: none;
	}
}

.mcms-qsheet {
	display: flex;
	flex-direction: column;
	gap: var(--mcms-gap);
}

.mcms-qsheet__contact {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.mcms-wrap .mcms-qsheet__mail {
	align-self: flex-start;
}

.mcms-qsheet__title {
	font-size: var(--mcms-text-md);
	font-weight: 700;
	margin-top: 4px;
}

/* ==================================================================
  23. COPY ROWS, COPY BUTTONS, MONOSPACE, SOFT WARNINGS
   .mcms-copylist / .mcms-copyrow   label + value; tap the row = copy
   .mcms-copy-btn                   small square copy icon
   .mcms-mono / .mcms-input--mono   codes (VIN, ΑΦΜ)
   .mcms-field__warn                amber "check this" under a field
   ================================================================== */
.mcms-copylist {
	display: flex;
	flex-direction: column;
	background: var(--mcms-surface);
	border: 1px solid var(--mcms-line);
	border-radius: var(--mcms-radius-md);
	overflow: hidden;
}

.mcms-wrap .mcms-copyrow {
	display: grid;
	grid-template-columns: 118px minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 9px 12px 9px var(--mcms-pad);
	border: 0;
	border-top: 1px solid var(--mcms-line);
	border-radius: 0;
	background: var(--mcms-surface);
	color: var(--mcms-text);
	font: inherit;
	text-align: left;
	white-space: normal;
	cursor: pointer;
	transition: background var(--mcms-ease);
}

.mcms-wrap .mcms-copyrow:first-child {
	border-top: 0;
}

.mcms-wrap button.mcms-copyrow:hover {
	background: var(--mcms-surface-muted);
	color: var(--mcms-text);
}

.mcms-wrap button.mcms-copyrow:active {
	background: var(--mcms-brand-softer);
}

.mcms-wrap .mcms-copyrow.is-static {
	grid-template-columns: 118px minmax(0, 1fr);
	cursor: default;
}

.mcms-copyrow__label {
	color: var(--mcms-text-muted);
	font-size: var(--mcms-text-sm);
	line-height: 1.3;
}

.mcms-copyrow__main {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.mcms-copyrow__value {
	font-size: var(--mcms-text-md);
	font-weight: 600;
	line-height: 1.35;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
}

.mcms-copyrow__value.is-empty {
	color: var(--mcms-text-muted);
	font-weight: 400;
}

.mcms-copyrow__icon {
	display: inline-flex;
	color: var(--mcms-line-strong);
}

.mcms-copyrow__icon svg {
	width: 18px;
	height: 18px;
}

.mcms-wrap button.mcms-copyrow:hover .mcms-copyrow__icon {
	color: var(--mcms-brand-strong);
}

@media (max-width: 380px) {
	.mcms-wrap .mcms-copyrow {
		grid-template-columns: 92px minmax(0, 1fr) auto;
		padding-left: 12px;
	}
	.mcms-wrap .mcms-copyrow.is-static {
		grid-template-columns: 92px minmax(0, 1fr);
	}
}

.mcms-wrap .mcms-copy-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: var(--mcms-radius-sm);
	background: transparent;
	color: var(--mcms-text-muted);
	cursor: pointer;
}

.mcms-copy-btn svg {
	width: 16px;
	height: 16px;
}

.mcms-wrap .mcms-copy-btn:hover {
	background: var(--mcms-brand-softer);
	color: var(--mcms-brand-strong);
}

.mcms-mono,
.mcms-wrap .mcms-input--mono {
	font-family: var(--mcms-font-mono);
	letter-spacing: .03em;
}

.mcms-field__warn {
	padding: 6px 10px;
	border-radius: var(--mcms-radius-sm);
	background: var(--mcms-warning-soft);
	color: var(--mcms-warning);
	font-size: var(--mcms-text-xs);
	font-weight: 600;
}

/* A text block with a copy button in its corner (order notes, offer request). */
.mcms-copyable {
	position: relative;
	padding-right: 44px;
}

.mcms-wrap .mcms-copyable > .mcms-copy-btn {
	position: absolute;
	top: 6px;
	right: 6px;
}

/* ==================================================================
  24. KILOMETRES LINE (order page) + NOTES COPY BUTTON
   ================================================================== */
.mcms-wrap .mcms-km {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 12px var(--mcms-pad);
	border: 0;
	border-top: 1px solid var(--mcms-line);
	background: var(--mcms-surface);
	color: var(--mcms-text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.mcms-wrap .mcms-km:hover {
	background: var(--mcms-surface-muted);
	color: var(--mcms-text);
}

.mcms-km__icon {
	display: inline-flex;
	color: var(--mcms-brand-strong);
}

.mcms-km__icon svg {
	width: 20px;
	height: 20px;
}

.mcms-km__main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.mcms-km__label {
	font-size: var(--mcms-text-xs);
	font-weight: 700;
	color: var(--mcms-text-muted);
}

.mcms-km__value {
	font-size: var(--mcms-text-md);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.mcms-km__value.is-empty {
	color: var(--mcms-text-muted);
	font-weight: 400;
}

.mcms-km__hint {
	font-size: var(--mcms-text-xs);
	color: var(--mcms-text-muted);
}

/* The order page's km card (0.11.1): the line on its own, under the order head. */
.mcms-wrap .mcms-km-card {
	margin-top: 8px;
	overflow: hidden;
}

.mcms-wrap .mcms-km-card .mcms-km {
	border-top: 0;
}

/* The km box on the quick order and in the km modal. */
.mcms-km-input {
	display: flex;
	align-items: center;
	gap: 8px;
}

.mcms-wrap .mcms-km-input .mcms-input {
	flex: 1;
	font-size: var(--mcms-text-lg);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.mcms-km-input__unit {
	font-weight: 700;
	color: var(--mcms-text-muted);
}

/* Notes timeline: copy (everyone's notes) + delete (own notes) in the corner.
   The delete button's own position lives in follow.css; inside this group
   it simply sits next to the copy button. */
.mcms-note__actions {
	position: absolute;
	top: 4px;
	right: 4px;
	display: flex;
	gap: 2px;
}

.mcms-wrap .mcms-note__actions .mcms-note__del {
	position: static;
}

.mcms-wrap .mcms-note .mcms-note__head {
	padding-right: 36px;
}

.mcms-wrap .mcms-note.is-mine .mcms-note__head {
	padding-right: 70px;
}

/* The reminder badge in a record's header is a button: it jumps to
   Παρακολούθηση (MCMS.follow.jumpBadge). */
.mcms-wrap button.mcms-remind-jump {
	margin: 0;
	border: 0;
	font-family: var(--mcms-font);
	cursor: pointer;
}

/* Where the jump lands: below the sticky top bar, not under it. */
.mcms-follow-section {
	scroll-margin-top: 90px;
}

.mcms-offer-head__status {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
