/* RS AutoWorks — front-end styles (portal, documents, forms) */

:root {
	--rsaw-navy: #12233f;
	--rsaw-orange: #ff7a1a;
	--rsaw-text: #1f2933;
	--rsaw-muted: #64748b;
	--rsaw-line: #e5e7eb;
	--rsaw-radius: 12px;
}

.rsaw-portal,
.rsaw-form,
.rsaw-booking-form,
.rsaw-status-result {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--rsaw-text);
	line-height: 1.6;
}

/* Portal ------------------------------------------------------------------ */
.rsaw-portal {
	max-width: 880px;
	margin: 0 auto;
	padding: 8px 0 32px;
}

.rsaw-portal__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 22px;
	flex-wrap: wrap;
}

.rsaw-portal__header h2 {
	margin: 0 0 2px;
	font-size: 24px;
	color: var(--rsaw-navy);
	line-height: 1.25;
}

.rsaw-portal__header p {
	margin: 0;
}

.rsaw-portal__section {
	margin-bottom: 30px;
}

.rsaw-portal__section h3 {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--rsaw-muted);
	margin: 0 0 10px;
	font-weight: 700;
}

.rsaw-portal__card {
	background: #fff;
	border: 1px solid var(--rsaw-line);
	border-radius: var(--rsaw-radius);
	padding: 18px 20px;
	margin-bottom: 12px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.rsaw-portal__card--narrow {
	max-width: 440px;
	margin: 40px auto;
}

.rsaw-portal__card h2 {
	margin-top: 0;
	font-size: 20px;
	color: var(--rsaw-navy);
}

/* Lists ------------------------------------------------------------------- */
.rsaw-list {
	border: 1px solid var(--rsaw-line);
	border-radius: var(--rsaw-radius);
	overflow: hidden;
	background: #fff;
}

.rsaw-list__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--rsaw-line);
}

.rsaw-list__row:last-child {
	border-bottom: 0;
}

.rsaw-list__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.rsaw-job__main {
	flex: 1;
	min-width: 0;
}

.rsaw-job__title {
	display: flex;
	gap: 8px;
	align-items: baseline;
	flex-wrap: wrap;
	margin-bottom: 2px;
}

.rsaw-job__side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
}

.rsaw-amount {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--rsaw-navy);
}

/* Timeline ---------------------------------------------------------------- */
.rsaw-timeline {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
}

.rsaw-timeline li {
	position: relative;
	padding: 0 0 10px 18px;
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.rsaw-timeline__dot {
	position: absolute;
	left: 3px;
	top: 8px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--rsaw-orange);
}

/* Vehicles ---------------------------------------------------------------- */
.rsaw-vehicle-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 12px;
}

.rsaw-vehicle .rsaw-reg {
	display: inline-block;
	background: #fef3c7;
	border: 1px solid #fcd34d;
	color: #78350f;
	font-weight: 800;
	letter-spacing: .07em;
	padding: 2px 9px;
	border-radius: 5px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 14px;
}

.rsaw-vehicle__name {
	font-weight: 650;
	margin: 8px 0 4px;
}

.rsaw-due--soon { color: #a15c00; font-weight: 600; }
.rsaw-due--over { color: #b32d2e; font-weight: 700; }

/* Quotes ------------------------------------------------------------------ */
.rsaw-quote__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 12px;
}

.rsaw-quote__total {
	font-size: 21px;
	font-weight: 750;
	color: var(--rsaw-navy);
	font-variant-numeric: tabular-nums;
}

.rsaw-quote__items {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
	border-top: 1px solid var(--rsaw-line);
}

.rsaw-quote__items li {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	padding: 8px 0;
	border-bottom: 1px solid #f1f5f9;
	font-size: 14px;
}

.rsaw-quote__items li span:last-child {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	white-space: nowrap;
}

.rsaw-quote__actions {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

/* Badges ------------------------------------------------------------------ */
.rsaw-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 650;
	white-space: nowrap;
	background: #eef2f7;
	color: #475569;
	border: 1px solid #dbe1e8;
}

.rsaw-badge[style*="--rsaw-badge"] {
	background: #eef2f7;
	color: var(--rsaw-badge);
	border-color: color-mix(in srgb, var(--rsaw-badge) 30%, #fff);
}

.rsaw-badge[style*="--rsaw-badge"]::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	margin-right: 5px;
	vertical-align: middle;
}

/* Buttons ----------------------------------------------------------------- */
.rsaw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #fff;
	border: 1px solid #cbd5e1;
	color: var(--rsaw-text);
	padding: 10px 18px;
	border-radius: 9px;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease, transform .06s ease;
	min-height: 44px;
}

.rsaw-btn:hover {
	background: #f8fafc;
	color: var(--rsaw-text);
}

.rsaw-btn:active {
	transform: translateY(1px);
}

.rsaw-btn--primary {
	background: var(--rsaw-orange);
	border-color: var(--rsaw-orange);
	color: #1a1206;
}

.rsaw-btn--primary:hover {
	background: #ff8c3a;
	color: #1a1206;
}

.rsaw-btn--ghost {
	background: transparent;
}

.rsaw-btn--small {
	padding: 6px 12px;
	min-height: 34px;
	font-size: 13px;
}

/* Forms ------------------------------------------------------------------- */
.rsaw-form label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin: 14px 0 5px;
	color: #334155;
}

.rsaw-form input[type="text"],
.rsaw-form input[type="email"],
.rsaw-form input[type="tel"],
.rsaw-form input[type="date"],
.rsaw-form input[type="search"],
.rsaw-form select,
.rsaw-form textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid #cbd5e1;
	border-radius: 9px;
	font-size: 16px;
	background: #fff;
	color: var(--rsaw-text);
	box-sizing: border-box;
}

.rsaw-form input:focus,
.rsaw-form select:focus,
.rsaw-form textarea:focus {
	outline: 2px solid var(--rsaw-orange);
	outline-offset: 1px;
	border-color: transparent;
}

.rsaw-form button[type="submit"] {
	margin-top: 18px;
	width: 100%;
}

.rsaw-field-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 0 14px;
}

.rsaw-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.rsaw-reg-input {
	text-transform: uppercase;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-weight: 700;
	letter-spacing: .05em;
}

/* Notices ----------------------------------------------------------------- */
.rsaw-notice {
	padding: 13px 16px;
	border-radius: 10px;
	border: 1px solid;
	font-size: 14px;
	margin-bottom: 16px;
}

.rsaw-notice--success {
	background: #f0fdf4;
	border-color: #bbf7d0;
	color: #166534;
}

.rsaw-notice--error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}

.rsaw-notice--info {
	background: #eff6ff;
	border-color: #bfdbfe;
	color: #1e40af;
}

/* Misc -------------------------------------------------------------------- */
.rsaw-muted { color: var(--rsaw-muted); }
.rsaw-small { font-size: 14px; }
.rsaw-tiny { font-size: 12px; }

.rsaw-details {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 6px 16px;
	margin: 0;
	font-size: 14px;
}

.rsaw-details dt {
	color: var(--rsaw-muted);
}

.rsaw-details dd {
	margin: 0;
	font-weight: 600;
}

/* Documents (quote / invoice / job card) ---------------------------------- */
.rsaw-doc {
	max-width: 820px;
	margin: 0 auto;
	padding: 28px 24px;
	background: #fff;
	color: #1f2933;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.55;
}

.rsaw-doc__toolbar {
	max-width: 820px;
	margin: 0 auto 16px;
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	flex-wrap: wrap;
}

.rsaw-doc__head {
	display: flex;
	justify-content: space-between;
	gap: 24px;
	padding-bottom: 18px;
	border-bottom: 3px solid var(--rsaw-navy);
	margin-bottom: 22px;
	flex-wrap: wrap;
}

.rsaw-doc__brand {
	font-size: 21px;
	font-weight: 800;
	color: var(--rsaw-navy);
	letter-spacing: -.01em;
	margin-bottom: 6px;
}

.rsaw-doc__brand img {
	max-height: 62px;
	margin-bottom: 8px;
	display: block;
}

.rsaw-doc__meta {
	text-align: right;
	min-width: 190px;
}

.rsaw-doc__type {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--rsaw-navy);
	margin-bottom: 2px;
}

.rsaw-doc__number {
	font-size: 15px;
	font-weight: 700;
}

.rsaw-doc__columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-bottom: 24px;
}

.rsaw-doc__label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--rsaw-muted);
	font-weight: 700;
	margin-bottom: 4px;
}

.rsaw-doc__table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
}

.rsaw-doc__table th {
	text-align: left;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--rsaw-muted);
	padding: 8px 6px;
	border-bottom: 2px solid var(--rsaw-navy);
}

.rsaw-doc__table td {
	padding: 9px 6px;
	border-bottom: 1px solid var(--rsaw-line);
	vertical-align: top;
}

.rsaw-doc__table .num {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.rsaw-doc__table .mid {
	text-align: center;
	white-space: nowrap;
}

.rsaw-doc__totals {
	margin-left: auto;
	width: 290px;
	border-top: 1px solid var(--rsaw-line);
	padding-top: 10px;
}

.rsaw-doc__totals dl {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 5px 16px;
	margin: 0;
	font-size: 13px;
}

.rsaw-doc__totals dt {
	color: var(--rsaw-muted);
}

.rsaw-doc__totals dd {
	margin: 0;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.rsaw-doc__grand {
	font-size: 16px;
	font-weight: 800;
	color: var(--rsaw-navy);
	border-top: 2px solid var(--rsaw-navy);
	padding-top: 7px;
	margin-top: 5px;
}

.rsaw-doc__note {
	background: #f8fafc;
	border-left: 3px solid var(--rsaw-orange);
	padding: 12px 16px;
	border-radius: 0 8px 8px 0;
	margin-bottom: 18px;
	font-size: 13px;
}

.rsaw-doc__terms {
	font-size: 11px;
	color: var(--rsaw-muted);
	line-height: 1.6;
	border-top: 1px solid var(--rsaw-line);
	padding-top: 14px;
	margin-top: 24px;
}

.rsaw-doc__footer {
	text-align: center;
	font-size: 11px;
	color: var(--rsaw-muted);
	margin-top: 18px;
}

.rsaw-doc__reg {
	display: inline-block;
	background: #fef3c7;
	border: 1px solid #fcd34d;
	color: #78350f;
	font-weight: 800;
	letter-spacing: .07em;
	padding: 3px 10px;
	border-radius: 5px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 15px;
}

.rsaw-doc__signature {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	margin-top: 34px;
}

.rsaw-doc__signature-line {
	border-bottom: 1px solid #94a3b8;
	height: 40px;
	margin-bottom: 5px;
}

.rsaw-doc__checks {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
	margin-bottom: 18px;
}

.rsaw-doc__checks td {
	border: 1px solid var(--rsaw-line);
	padding: 6px 9px;
}

.rsaw-doc__checks td:first-child {
	font-weight: 600;
	width: 45%;
	background: #f8fafc;
}

.rsaw-status-pill {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	background: #eef2f7;
	color: #475569;
}

.rsaw-status-pill[data-pill] {
	background: color-mix(in srgb, attr(data-pill) 14%, white);
}

.rsaw-pay-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
	margin-bottom: 16px;
}

.rsaw-pay-table th,
.rsaw-pay-table td {
	border: 1px solid var(--rsaw-line);
	padding: 6px 9px;
	text-align: left;
}

.rsaw-pay-table th {
	background: #f8fafc;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--rsaw-muted);
}

@media (max-width: 640px) {
	.rsaw-portal__header,
	.rsaw-list__row {
		flex-direction: column;
		align-items: stretch;
	}

	.rsaw-list__meta,
	.rsaw-job__side {
		align-items: flex-start;
		flex-direction: row;
		flex-wrap: wrap;
	}

	.rsaw-doc__columns,
	.rsaw-doc__signature {
		grid-template-columns: 1fr;
	}

	.rsaw-doc__head {
		flex-direction: column;
	}

	.rsaw-doc__meta {
		text-align: left;
	}

	.rsaw-doc__totals {
		width: 100%;
	}
}

/* Document pages rendered by the plugin's own templates */
body.rsaw-doc-page {
	background: #f1f5f9;
	margin: 0;
	padding: 24px 16px 60px;
}

@media (max-width: 640px) {
	body.rsaw-doc-page {
		padding: 12px 8px 40px;
	}
}
