/* Forkcare Service Portal */

/* ------------------------------------------------------------------
   STANDALONE DOCUMENT
   The portal renders its own HTML document at /dashboard - the theme
   never loads, so there is no header, footer, menu or theme CSS to
   fight. These are the only global resets needed.
   ------------------------------------------------------------------ */
html { -webkit-text-size-adjust: 100%; }

body.fcp-standalone {
	margin: 0;
	padding: 0;
	background: #f4f6f9;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #14181d;
	min-height: 100vh;
	overscroll-behavior-y: none;
}

body.fcp-standalone img { max-width: 100%; height: auto; }

.fcp-app {
	--ink: #14181d;
	--ink-2: #5a6470;
	--line: #dde2e8;
	--bg: #f4f6f9;
	--card: #fff;
	--brand: #14181d;
	--accent: #ffb400;
	--ok: #0a7d3c;
	--err: #c62026;
	--radius: 10px;

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--ink);
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 14px 60px;
	-webkit-font-smoothing: antialiased;
}

.fcp-app * { box-sizing: border-box; }

/* ---- Login (full viewport, standalone) ---- */
.fcp-login-wrap {
	display: flex; align-items: center; justify-content: center;
	min-height: 100vh; padding: 24px 16px;
	background: linear-gradient(160deg, #14181d 0%, #232b34 100%);
}
.fcp-login-card {
	background: #fff; border-radius: 16px;
	padding: 38px 30px 30px; width: 100%; max-width: 380px; text-align: center;
	box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.fcp-logo-mark {
	width: 54px; height: 54px; border-radius: 14px; background: var(--brand, #14181d);
	color: #ffb400; display: grid; place-items: center;
	font-size: 30px; font-weight: 800; margin: 0 auto 14px;
}
.fcp-logo { font-size: 28px; font-weight: 800; letter-spacing: 1px; line-height: 1; }
.fcp-tag { font-size: 9px; letter-spacing: 3.5px; color: #9aa4af; margin: 5px 0 0; }
.fcp-login-sub {
	font-size: 12px; letter-spacing: .5px; color: #5a6470;
	margin: 14px 0 20px; padding-top: 14px; border-top: 1px solid #eef1f4;
	text-transform: uppercase; font-weight: 700;
}
.fcp-login-err {
	background: #fff1f1; border: 1px solid #f0c0c0; color: #c62026;
	border-radius: 8px; padding: 9px; font-size: 13px; margin-bottom: 14px;
}
.fcp-login-card label {
	display: block; text-align: left; font-size: 11px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .5px; color: #5a6470; margin-bottom: 12px;
}
.fcp-login-card input[type=text], .fcp-login-card input[type=password] {
	width: 100%; padding: 12px; margin-top: 4px; border: 1px solid #dde2e8;
	border-radius: 8px; font-size: 16px; box-sizing: border-box;
}
.fcp-login-card input:focus { outline: 2px solid #ffb400; border-color: #ffb400; }
.fcp-login-card .login-remember { font-size: 12px; text-transform: none; letter-spacing: 0; }
.fcp-login-card .login-remember input { width: auto; margin-right: 5px; }
.fcp-login-card .button, .fcp-login-card input[type=submit] {
	width: 100%; background: #14181d; color: #fff; border: 0;
	padding: 14px; border-radius: 8px; font-weight: 700; cursor: pointer;
	font-size: 15px; margin-top: 6px;
}
.fcp-login-card .button:hover, .fcp-login-card input[type=submit]:hover { background: #000; }
.fcp-login-lost {
	display: inline-block; margin-top: 16px; font-size: 12px;
	color: #5a6470; text-decoration: none;
}
.fcp-login-lost:hover { color: #14181d; text-decoration: underline; }

/* ---- Topbar (standalone app bar) ---- */
.fcp-topbar {
	display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
	padding: 12px 16px; margin: 0 -14px 22px;
	background: var(--brand); color: #fff;
	position: sticky; top: 0; z-index: 50;
	padding-top: calc(12px + env(safe-area-inset-top));
}
.fcp-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; color: #fff; }
.fcp-brand em { font-style: normal; font-weight: 400; color: #9aa4af; font-size: 13px; }
.fcp-mark {
	width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--brand);
	display: grid; place-items: center; font-weight: 800;
}
.fcp-nav { display: flex; gap: 6px; margin-left: auto; }
.fcp-nav a {
	padding: 7px 13px; border-radius: 7px; text-decoration: none;
	color: #c4ccd4; font-weight: 600; font-size: 14px;
}
.fcp-nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.fcp-user { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #9aa4af; }
.fcp-out { color: var(--accent); text-decoration: none; font-weight: 600; }

/* ---- Headings / stats ---- */
.fcp-h2 { font-size: 18px; margin: 26px 0 12px; font-weight: 700; }
.fcp-h2 em { font-style: normal; font-weight: 400; color: var(--ink-2); font-size: 14px; }

.fcp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fcp-stat {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 16px; display: flex; flex-direction: column;
}
.fcp-stat .n { font-size: 26px; font-weight: 800; }
.fcp-stat .l { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-2); }

/* ---- Tiles ---- */
.fcp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.fcp-tile {
	background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent);
	border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink);
	display: flex; flex-direction: column; gap: 4px; transition: .15s;
}
.fcp-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20,24,29,.09); }
.fcp-tile .ico { font-size: 22px; }
.fcp-tile .sub { font-size: 12px; color: var(--ink-2); }

/* ---- Cards ---- */
.fcp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.fcp-card {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 14px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 3px;
}
.fcp-card:hover { border-color: var(--brand); }
.fcp-card-top { display: flex; justify-content: space-between; align-items: center; }
.fcp-docket { font-size: 12px; color: var(--err); font-weight: 800; }
.fcp-docket-lg { font-size: 15px; color: var(--err); font-weight: 800; }
.fcp-meta { font-size: 12px; color: var(--ink-2); }

/* ---- Badges ---- */
.fcp-badge {
	display: inline-block; padding: 3px 9px; border-radius: 20px;
	font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
}
.fcp-draft { background: #fff3d6; color: #8a6100; }
.fcp-submitted { background: #dff3e6; color: var(--ok); }

/* ---- Form ---- */
.fcp-form-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fcp-fs {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 16px; margin: 0 0 16px;
}
.fcp-fs legend {
	font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .6px;
	padding: 3px 10px; background: var(--brand); color: #fff; border-radius: 6px;
}
.fcp-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.fcp-grid .col-4 { grid-column: span 4; }
.fcp-grid .col-6 { grid-column: span 6; }
.fcp-grid .col-12 { grid-column: span 12; }

.fcp-app label, .fcp-lbl {
	display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
	letter-spacing: .5px; color: var(--ink-2); margin-bottom: 4px;
}
.fcp-app input[type=text], .fcp-app input[type=email], .fcp-app input[type=date],
.fcp-app input[type=search], .fcp-app textarea {
	width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 7px;
	font-size: 16px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink);
	background: #fff;
}
.fcp-app input:focus, .fcp-app textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.fcp-app .invalid { border-color: var(--err); background: #fff6f6; }
.fcp-hint { font-size: 12px; color: var(--ink-2); margin: 8px 0 0; }

/* ---- Custom dropdown (avoids theme `select {width:100%}` overrides) ---- */
.fcp-dd { position: relative; }
.fcp-dd-btn {
	width: 100%; text-align: left; padding: 10px 12px; background: #fff;
	border: 1px solid var(--line); border-radius: 7px; font-size: 15px; cursor: pointer;
	display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--ink);
}
.fcp-dd-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcp-dd-btn i { font-style: normal; color: var(--ink-2); flex-shrink: 0; }
.fcp-dd-menu {
	display: none; position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: 0;
	background: #fff; border: 1px solid var(--line); border-radius: 8px;
	box-shadow: 0 10px 26px rgba(20,24,29,.14);
	/* A menu of 200+ customers must scroll rather than run off the page. */
	max-height: 320px; overflow-y: auto; overflow-x: hidden;
	overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
	min-width: 220px;
}
.fcp-dd.open .fcp-dd-menu { display: block; }
.fcp-dd.drop-up .fcp-dd-menu { top: auto; bottom: calc(100% + 4px); }
.fcp-dd-menu a {
	display: block; padding: 10px 12px; text-decoration: none; color: var(--ink);
	font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fcp-dd-menu a:hover, .fcp-dd-menu a.active { background: var(--bg); }
.fcp-dd-menu a.on { background: #eef4fb; font-weight: 700; }

/* Type-to-filter, added by JS to any menu with enough items to warrant it. */
.fcp-dd-search {
	position: sticky; top: 0; background: #fff; padding: 8px;
	border-bottom: 1px solid var(--line); z-index: 1;
}
.fcp-dd-search input {
	width: 100%; padding: 7px 9px; border: 1px solid var(--line);
	border-radius: 6px; font-size: 14px; box-sizing: border-box;
}
.fcp-dd-none { padding: 12px; font-size: 13px; color: var(--ink-2); text-align: center; }

/* Scrollbar styling so a long list looks deliberate rather than broken. */
.fcp-dd-menu::-webkit-scrollbar { width: 10px; }
.fcp-dd-menu::-webkit-scrollbar-track { background: var(--bg); border-radius: 0 8px 8px 0; }
.fcp-dd-menu::-webkit-scrollbar-thumb { background: #c9d1d9; border-radius: 6px; border: 2px solid var(--bg); }
.fcp-dd-menu::-webkit-scrollbar-thumb:hover { background: #a8b3bd; }

/* ---- Checklist ---- */
.fcp-bulk { margin-bottom: 10px; }
.fcp-check-list { display: flex; flex-direction: column; }
.fcp-check-row {
	display: grid; grid-template-columns: 1fr 320px; gap: 12px; align-items: center;
	padding: 9px 6px; border-bottom: 1px solid var(--line);
}
.fcp-check-row:nth-child(odd) { background: #fafbfc; }
.fcp-check-row.is-action { background: #fff5f5; }
.fcp-check-label { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.fcp-codes { display: flex; gap: 3px; flex-shrink: 0; }
.fcp-code {
	font-style: normal; font-size: 10px; font-weight: 700; width: 20px; height: 20px;
	display: grid; place-items: center; border-radius: 4px;
	background: #eef1f4; color: #9aa4af;
}
.fcp-code.on { background: var(--brand); color: var(--accent); }

.fcp-seg { display: flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.fcp-seg-btn {
	flex: 1; padding: 8px 6px; background: #fff; border: 0; border-right: 1px solid var(--line);
	font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink-2);
}
.fcp-seg-btn:last-child { border-right: 0; }
.fcp-seg-btn.on[data-status=ok] { background: var(--ok); color: #fff; }
.fcp-seg-btn.on[data-status=action] { background: var(--err); color: #fff; }
.fcp-seg-btn.on[data-status=na] { background: #8b95a1; color: #fff; }
.fcp-note { margin-top: 6px; }
.fcp-note.hidden { display: none; }

/* ---- Parts ---- */
.fcp-table-wrap { overflow-x: auto; }
.fcp-parts, .fcp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fcp-parts th, .fcp-table th {
	text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .5px;
	color: var(--ink-2); padding: 8px 6px; border-bottom: 2px solid var(--line);
}
.fcp-parts td, .fcp-table td { padding: 5px 4px; border-bottom: 1px solid var(--line); }
.fcp-x {
	background: none; border: 0; color: var(--err); font-size: 20px; cursor: pointer; line-height: 1; padding: 0 6px;
}
.fcp-actions a { margin-right: 10px; font-size: 13px; font-weight: 600; }

/* ---- Photos ---- */
.fcp-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 10px; }
.fcp-photo { position: relative; }
.fcp-photo img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.fcp-photo .fcp-x {
	position: absolute; top: 3px; right: 3px; background: rgba(255,255,255,.94);
	border-radius: 50%; width: 24px; height: 24px;
}
.fcp-upload input { display: none; }
.fcp-upload span {
	display: inline-block; padding: 11px 18px; background: var(--bg);
	border: 2px dashed var(--line); border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px;
}

/* ---- Signatures ---- */
.fcp-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fcp-sig-box { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.fcp-pad-wrap { position: relative; margin-top: 8px; }
.fcp-pad {
	width: 100%; height: 130px; background: #fcfdfe;
	border: 1px dashed #b9c2cc; border-radius: 8px; touch-action: none; display: block;
}
.fcp-clear {
	position: absolute; top: 6px; right: 6px; background: #fff; border: 1px solid var(--line);
	border-radius: 5px; font-size: 11px; padding: 3px 8px; cursor: pointer;
}

/* ---- Action bar ---- */
.fcp-bar {
	position: sticky; bottom: 0; background: rgba(255,255,255,.97); backdrop-filter: blur(8px);
	border-top: 1px solid var(--line); display: flex;
	justify-content: flex-end; align-items: center; gap: 10px; z-index: 30;
	padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
}
.fcp-msg { margin-right: auto; font-size: 13px; color: var(--ok); font-weight: 600; }
.fcp-msg.err { color: var(--err); }
.fcp-btn, .fcp-btn-sm {
	border: 1px solid var(--line); background: #fff; color: var(--ink);
	border-radius: 8px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.fcp-btn { padding: 11px 20px; font-size: 14px; }
.fcp-btn-sm { padding: 7px 12px; font-size: 12px; }
.fcp-btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.fcp-btn.primary:disabled, .fcp-btn:disabled { opacity: .45; cursor: not-allowed; }
.fcp-btn.ghost { background: #fff; }

.fcp-filters { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.fcp-filters input[type=search] { flex: 1; min-width: 200px; }
.fcp-filters .fcp-dd { width: 170px; }

.fcp-notice {
	background: #fff8e1; border: 1px solid #f0d98a; border-radius: 8px;
	padding: 12px 14px; font-size: 14px; margin-bottom: 16px;
}
.fcp-empty { color: var(--ink-2); font-size: 14px; padding: 16px 0; text-align: center; }
.fcp-form.is-locked input, .fcp-form.is-locked textarea, .fcp-form.is-locked button:not(.fcp-btn) {
	pointer-events: none; opacity: .72;
}

/* ---- Mobile ---- */
@media (max-width: 860px) {
	.fcp-grid .col-4, .fcp-grid .col-6 { grid-column: span 12; }
	.fcp-check-row { grid-template-columns: 1fr; gap: 8px; }
	.fcp-sigs { grid-template-columns: 1fr; }
	.fcp-stats { grid-template-columns: 1fr 1fr 1fr; }
	.fcp-stat .n { font-size: 20px; }
	.fcp-nav { order: 3; width: 100%; margin-left: 0; }
	.fcp-nav a { flex: 1; text-align: center; background: rgba(255,255,255,.08); }
	.fcp-user { margin-left: auto; }
	.fcp-brand em { display: none; }

	.fcp-parts thead { display: none; }
	.fcp-parts tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
	.fcp-parts td { border: 0; padding: 0; }
	.fcp-parts td[data-l="Description"] { grid-column: span 2; }
	.fcp-parts td::before {
		content: attr(data-l); display: block; font-size: 10px;
		text-transform: uppercase; color: var(--ink-2); font-weight: 700; margin-bottom: 2px;
	}
	.fcp-bar { flex-wrap: wrap; }
	.fcp-bar .fcp-btn { flex: 1; }
	.fcp-msg { width: 100%; margin-bottom: 6px; }
}

/* ---- ServiceM8 job picker ---- */
.fcp-sm8-fs { border-left: 4px solid #7dc836; }
.hidden { display: none !important; }

.fcp-sm8-searchbar { display: flex; gap: 8px; margin-bottom: 10px; }
.fcp-sm8-searchbar input { flex: 1; }

.fcp-sm8-results { max-height: 320px; overflow-y: auto; border-radius: 8px; }
.fcp-sm8-row {
	display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
	width: 100%; text-align: left; padding: 11px 12px; cursor: pointer;
	background: #fff; border: 1px solid var(--line); border-radius: 8px;
	margin-bottom: 6px; position: relative;
}
.fcp-sm8-row:hover { border-color: #7dc836; background: #fbfff6; }
.fcp-sm8-row strong { font-size: 14px; }
.fcp-sm8-num { font-size: 11px; font-weight: 800; color: #7dc836; letter-spacing: .5px; }
.fcp-sm8-row .fcp-badge { position: absolute; top: 10px; right: 10px; }

.fcp-sm8-picked {
	display: flex; justify-content: space-between; align-items: center; gap: 12px;
	background: #f3fbec; border: 1px solid #cfe8b8; border-radius: 8px; padding: 12px;
}
.fcp-sm8-picked-body { display: flex; align-items: center; gap: 11px; }
.fcp-sm8-picked-body div { display: flex; flex-direction: column; }
.fcp-sm8-tick {
	width: 26px; height: 26px; border-radius: 50%; background: #7dc836; color: #fff;
	display: grid; place-items: center; font-weight: 800; font-size: 14px; flex-shrink: 0;
}
.fcp-sm8-status { font-size: 12px; font-weight: 600; margin: 10px 0 0; }
.fcp-sm8-synced { color: var(--ok); }
.fcp-sm8-partial { color: var(--err); }
.fcp-empty.err { color: var(--err); }

.fcp-sm8-err {
	background: #fff1f1; border: 1px solid #f0c0c0; border-radius: 8px;
	padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
}
.fcp-sm8-err strong { color: var(--err); font-size: 13px; }
.fcp-sm8-err span { font-size: 12px; color: #7a4a4a; line-height: 1.5; }

/* ---- Photo upload states ---- */
.fcp-upload { cursor: pointer; display: inline-block; }
.fcp-upload span { transition: .15s; }
.fcp-upload:hover span { border-color: var(--accent); background: #fffaf0; }
.fcp-upload.is-disabled span { opacity: .5; cursor: not-allowed; }

.fcp-photo.is-uploading {
	height: 110px; border: 1px solid var(--line); border-radius: 8px;
	background: var(--bg); display: grid; place-items: center;
}
.fcp-photo-spin {
	width: 22px; height: 22px; border: 3px solid var(--line);
	border-top-color: var(--brand); border-radius: 50%;
	animation: fcp-spin .7s linear infinite;
}
@keyframes fcp-spin { to { transform: rotate(360deg); } }

/* ---- Fleet register ---- */
.fcp-back {
	display: inline-block; margin: 4px 0 10px; font-size: 13px;
	color: var(--ink-2); text-decoration: none; font-weight: 600;
}
.fcp-back:hover { color: var(--ink); }

.fcp-asset-head {
	display: flex; justify-content: space-between; align-items: flex-start;
	gap: 16px; flex-wrap: wrap;
}
.fcp-asset-head .fcp-h2 { margin-bottom: 4px; }
.fcp-asset-head .fcp-meta { display: block; }

.fcp-due-badge {
	background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--ok);
	border-radius: var(--radius); padding: 12px 18px; text-align: right; min-width: 130px;
}
.fcp-due-badge.is-soon { border-left-color: var(--accent); background: #fffdf5; }
.fcp-due-badge.is-overdue { border-left-color: var(--err); background: #fff5f5; }
.fcp-due-badge .n { display: block; font-size: 22px; font-weight: 800; line-height: 1.1; }
.fcp-due-badge .l { display: block; font-size: 11px; color: var(--ink-2); }
.fcp-due-badge.is-overdue .n { color: var(--err); }

.fcp-badge.fcp-overdue { background: #ffe3e3; color: var(--err); }
.fcp-card-due { border-left: 4px solid var(--accent); }
.fcp-card-due.is-overdue { border-left-color: var(--err); }

/* ---- Recurring faults ---- */
.fcp-faults { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.fcp-fault {
	background: #fff8f8; border: 1px solid #f0d5d5; border-radius: var(--radius);
	padding: 12px; display: flex; flex-direction: column; gap: 3px;
}
.fcp-fault-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fcp-fault-top strong { font-size: 13px; }
.fcp-fault-n {
	background: var(--err); color: #fff; border-radius: 20px;
	padding: 1px 8px; font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.fcp-fault-note { font-style: italic; }

/* ---- Timeline ---- */
.fcp-timeline { position: relative; padding-left: 22px; }
.fcp-timeline::before {
	content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px;
	width: 2px; background: var(--line);
}
.fcp-tl-item { position: relative; padding-bottom: 16px; }
.fcp-tl-dot {
	position: absolute; left: -22px; top: 5px; width: 12px; height: 12px;
	border-radius: 50%; background: var(--ok); border: 2px solid #fff;
	box-shadow: 0 0 0 2px var(--line);
}
.fcp-tl-dot.has-actions { background: var(--err); }
.fcp-tl-body {
	background: var(--card); border: 1px solid var(--line);
	border-radius: var(--radius); padding: 11px 13px;
	display: flex; flex-direction: column; gap: 3px;
}
.fcp-tl-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.fcp-tl-actions { color: var(--err); font-weight: 700; }
.fcp-tl-req { color: #8a6100; }
.fcp-tl-links { display: flex; gap: 12px; margin-top: 5px; }
.fcp-tl-links a { font-size: 12px; font-weight: 600; }

/* ---- Serial recognition banner ---- */
.fcp-asset-hit {
	background: #f2f7ff; border: 1px solid #c7dcf7; border-radius: 8px;
	padding: 11px 13px; display: flex; flex-direction: column; gap: 3px;
}
.fcp-asset-hit-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.fcp-asset-hit-top strong { font-size: 13px; color: #14509c; }
.fcp-asset-hit-top a { font-size: 12px; font-weight: 600; text-decoration: none; }
.fcp-asset-hit .fcp-btn-sm { align-self: flex-start; margin-top: 6px; }

/* ---- Job row actions ---- */
.fcp-jobs-head {
	display: flex; justify-content: space-between; align-items: center;
	gap: 12px; flex-wrap: wrap;
}
.fcp-link-btn {
	background: none; border: 0; padding: 0; cursor: pointer;
	font-size: 13px; font-weight: 600; color: var(--ink-2);
	font-family: inherit;
}
.fcp-link-btn:hover { color: var(--ink); text-decoration: underline; }
.fcp-link-btn.is-danger { color: var(--err); }
.fcp-link-btn:disabled { opacity: .5; cursor: wait; text-decoration: none; }
.fcp-actions { white-space: nowrap; }
.fcp-actions > * { margin-right: 10px; }
.fcp-actions > *:last-child { margin-right: 0; }

.fcp-notice-archived {
	background: #f1f3f5; border-color: #ccd2d8; color: var(--ink-2);
}

/* ---- Fleet KPI bar ---- */
.fcp-fleet-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.fcp-kpi {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 14px; text-decoration: none; color: var(--ink);
	display: flex; flex-direction: column; border-bottom: 3px solid var(--line);
}
.fcp-kpi:hover { border-color: var(--ink-2); }
.fcp-kpi.on { border-bottom-color: var(--brand); background: #fbfcfd; }
.fcp-kpi .n { font-size: 24px; font-weight: 800; line-height: 1.1; }
.fcp-kpi .l { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2); }
.fcp-kpi:nth-child(1) .n { color: var(--err); }
.fcp-kpi:nth-child(2) .n { color: #b57b00; }

/* ---- Due states ---- */
.fcp-due { font-weight: 600; font-size: 13px; }
.fcp-due-overdue { color: var(--err); }
.fcp-due-due, .fcp-due-soon { color: #b57b00; }
.fcp-due-ok { color: var(--ink-2); }
.fcp-due-unknown { color: #9aa4af; font-style: italic; }

.fcp-row-overdue td { background: #fff8f8; }
.fcp-row-soon td { background: #fffdf5; }

.fcp-due-badge.is-overdue { border-left-color: var(--err); background: #fff5f5; }
.fcp-due-badge.is-soon, .fcp-due-badge.is-due { border-left-color: var(--accent); background: #fffdf5; }
.fcp-due-badge.is-unknown { border-left-color: #c9d1d9; }
.fcp-due-badge.is-ok { border-left-color: var(--ok); }

.fcp-card-due.is-overdue { border-left-color: var(--err); }
.fcp-card-due.is-soon, .fcp-card-due.is-due { border-left-color: var(--accent); }

.fcp-h2-link { font-size: 13px; font-weight: 600; text-decoration: none; margin-left: 10px; }
.fcp-inline-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.fcp-inline-form label { flex: 0 0 220px; }
.fcp-inline-form input { width: 100%; }

@media (max-width: 860px) {
	.fcp-fleet-bar { grid-template-columns: 1fr 1fr; }
}

.fcp-state {
	display: inline-block; background: var(--bg); border: 1px solid var(--line);
	border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 700;
	letter-spacing: .5px; color: var(--ink-2);
}
.fcp-booked {
	display: inline-block; margin-left: 6px; background: #eaf4ff; color: #14509c;
	border-radius: 3px; padding: 0 5px; font-size: 10px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .4px;
}

/* ---- Fleet management ---- */
.fcp-fleet-head {
	display: flex; justify-content: space-between; align-items: center;
	gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.fcp-fleet-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.fcp-field-hint {
	display: block; font-size: 10px; font-weight: 400; color: var(--ink-2);
	text-transform: none; letter-spacing: 0; margin-top: 3px;
}
.fcp-btn.is-danger, .fcp-btn-sm.is-danger { color: var(--err); border-color: #f0c0c0; }
.fcp-btn.is-danger:hover { background: #fff5f5; }
#fcp-asset-edit .fcp-bar, #fcp-add-form .fcp-bar { background: transparent; }

/* ---- Client portal ---- */
.fcp-client-head { margin-bottom: 16px; }
.fcp-client-head .fcp-h2 { margin: 0 0 2px; }

.fcp-ctabs {
	display: flex; gap: 4px; margin: 22px 0 16px;
	border-bottom: 2px solid var(--line); flex-wrap: wrap;
}
.fcp-ctab {
	padding: 10px 16px; text-decoration: none; color: var(--ink-2);
	font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent;
	margin-bottom: -2px;
}
.fcp-ctab:hover { color: var(--ink); }
.fcp-ctab.on { color: var(--ink); border-bottom-color: var(--accent); }

.fcp-jobcard { border-left: 4px solid var(--line); }
.fcp-jobcard.is-open { border-left-color: var(--ok); }
.fcp-jobcard.is-quote { border-left-color: var(--accent); }
.fcp-jobcard.is-done { border-left-color: #c9d1d9; }
.fcp-jobcard.is-closed { border-left-color: #c9d1d9; opacity: .7; }
.fcp-jobdesc { font-size: 13px; color: var(--ink-2); margin: 6px 0 0; line-height: 1.5; }

.fcp-badge.fcp-st-open { background: #dff3e6; color: var(--ok); }
.fcp-badge.fcp-st-quote { background: #fff3d6; color: #8a6100; }
.fcp-badge.fcp-st-done { background: #eef1f4; color: var(--ink-2); }
.fcp-badge.fcp-st-closed { background: #eef1f4; color: #9aa4af; }

.fcp-repairs { display: flex; flex-direction: column; gap: 10px; }
.fcp-repair {
	background: #fffaf5; border: 1px solid #f0dcc0; border-left: 4px solid var(--accent);
	border-radius: var(--radius); padding: 14px;
}
.fcp-repair-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.fcp-repair-body { margin: 8px 0 10px; font-size: 14px; line-height: 1.6; }

.fcp-client-foot {
	margin-top: 34px; padding-top: 16px; border-top: 1px solid var(--line);
	font-size: 13px; color: var(--ink-2); text-align: center;
}

/* ---- ServiceM8 job reference ---- */
.fcp-jobref {
	font-weight: 700; font-size: 13px; text-decoration: none;
	color: #14509c; white-space: nowrap;
}
.fcp-jobref:hover { text-decoration: underline; }

/* ---- Contract state ---- */
.fcp-ct-expired { color: var(--err); font-weight: 700; }
.fcp-ct-expiring { color: #b57b00; font-weight: 700; }
.fcp-ct-active { color: var(--ok); }
.fcp-ct-none { color: #9aa4af; font-style: italic; }

.fcp-row-retired td { opacity: .55; }
.fcp-row-retired strong { text-decoration: line-through; }

/* ---- Sortable table headers ---- */
.fcp-table thead th.fcp-sortable {
	cursor: pointer; user-select: none; white-space: nowrap;
}
.fcp-table thead th.fcp-sortable:hover { color: var(--brand); }
.fcp-sort-arrow {
	display: inline-block; width: 8px; font-style: normal;
	opacity: .25; font-size: 9px;
}
.fcp-sort-arrow::after { content: '\\2195'; }
th.sorted-asc .fcp-sort-arrow { opacity: 1; }
th.sorted-asc .fcp-sort-arrow::after { content: '\\2191'; }
th.sorted-desc .fcp-sort-arrow { opacity: 1; }
th.sorted-desc .fcp-sort-arrow::after { content: '\\2193'; }

/* ---- Export panel ---- */
.fcp-export-form {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 12px; margin: -6px 0 14px;
}
.fcp-export-form .fcp-dd { width: 190px; }
.fcp-export-date {
	display: flex; flex-direction: column; gap: 2px; font-size: 11px;
	font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2);
}
.fcp-export-date input {
	padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px;
}
.fcp-export-date input:disabled { background: var(--bg); color: #b7bec6; cursor: not-allowed; }
#fcp-export-hint { font-size: 11px; color: #b7bec6; }
#fcp-export-hint.is-active { color: var(--ink-2); font-weight: 600; }
