/* Veremon Hooldus app. Workshop tool: big targets for gloved hands, high contrast under shop lights,
 * plates and times readable at arm's length. Light by default, follows the phone's dark mode. */

:root {
	--bg: #F4F3EF;
	--surface: #FFFFFF;
	--surface-2: #FAF9F6;
	--sunk: #ECEAE4;
	--ink: #1B1A1F;
	--ink-2: #4B4852;
	--ink-3: #6B6771;
	--line: #E2DFD8;
	--line-2: #CBC7BE;
	--bar: #1B1A1F;
	--bar-ink: #F4F3EF;
	--blue: #1F59B0;
	--blue-hover: #17468C;
	--blue-ink: #1F59B0;
	--blue-tint: #E8F0FB;
	--sky: #34B2E6;
	--amber: #8A5A00;
	--amber-tint: #FFF1CF;
	--green: #1E6B3A;
	--green-tint: #DFF2E5;
	--red: #B3261E;
	--red-tint: #FBE7E5;
	--grey-tint: #ECEAE4;
	--shadow: 0 1px 2px rgba(27, 26, 31, .06), 0 2px 8px rgba(27, 26, 31, .05);
	--radius: 14px;
	--radius-s: 10px;
	--ease: cubic-bezier(.16, 1, .3, 1);
	--nav-h: 64px;
	--top-h: 56px;
	--safe-b: env(safe-area-inset-bottom, 0px);
	--safe-t: env(safe-area-inset-top, 0px);
	--font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #121115;
		--surface: #1C1B20;
		--surface-2: #222127;
		--sunk: #16151A;
		--ink: #F1EFEA;
		--ink-2: #CBC7CF;
		--ink-3: #9E9AA5;
		--line: #2E2D34;
		--line-2: #44424B;
		--bar: #0C0B0E;
		--blue: #3C78D8;
		--blue-hover: #4F87E0;
		--blue-ink: #8DB7F5;
		--blue-tint: #1B2A44;
		--amber: #F2C14E;
		--amber-tint: #3A2E10;
		--green: #6FD39A;
		--green-tint: #143322;
		--red: #FF8A80;
		--red-tint: #3D1715;
		--grey-tint: #2A292F;
		--shadow: 0 1px 2px rgba(0, 0, 0, .4);
		color-scheme: dark;
	}
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.vh {
	margin: 0;
	min-height: 100dvh;
	background: var(--bg);
	color: var(--ink);
	font: 400 16px/1.45 var(--font);
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue-ink); }
img, svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }
.vh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Boot / login ---------- */
.vh-boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--ink-3); }
.vh-boot img { animation: vh-pulse 1.4s ease-in-out infinite; border-radius: 12px; }
@keyframes vh-pulse { 50% { opacity: .45; transform: scale(.94); } }

/* Login. Phone: dark brand band, form sheet over it. ≥900px: workshop photo left, form right.
 * --vh-photo is only used inside the min-width query, so phones never download the photo. */
.vh-auth { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bar); }
.vh-auth__brand { padding: calc(28px + var(--safe-t)) 24px 44px; color: var(--bar-ink); }
.vh-auth__logo { width: 152px; height: auto; translate: -7.3% 0; /* PNG has ~7% transparent left padding: align the letters with the text */ }
.vh-auth__tag { margin: 12px 0 0; font-size: 15px; color: color-mix(in srgb, var(--bar-ink) 70%, transparent); }
.vh-auth__panel { flex: 1; margin-top: -20px; padding: 28px 20px calc(28px + var(--safe-b)); background: var(--bg); border-radius: 24px 24px 0 0; }
.vh-auth__inner { width: 100%; max-width: 400px; margin: 0 auto; }
.vh-auth__app { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 15px; font-weight: 700; color: var(--ink-2); }
.vh-auth__app img { border-radius: 8px; }
.vh-auth__title { margin: 0 0 4px; font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.vh-auth__lead { margin: 0 0 22px; color: var(--ink-2); }
.vh-auth__lead b { color: var(--ink); }
.vh-auth .vh-field > label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.vh-auth .vh-form .vh-btn { margin-top: 6px; }
.vh-auth .vh-field input[aria-invalid="true"] { border-color: var(--red); }
.vh-auth__links { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin: 14px 0 0; font-size: 15px; color: var(--ink-3); }
.vh-auth__links a { display: inline-block; padding: 10px 0; color: var(--blue-ink); font-weight: 600; text-underline-offset: 3px; }

.vh-pass { position: relative; }
.vh-auth .vh-pass input { padding-right: 56px; }
.vh-pass__eye { position: absolute; top: 3px; right: 3px; bottom: 3px; width: 48px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--ink-3); }
.vh-pass__eye:hover { color: var(--ink); }
.vh-pass__eye svg { width: 22px; height: 22px; }
.vh-pass__eye .i-hide, .vh-pass__eye[aria-pressed="true"] .i-show { display: none; }
.vh-pass__eye[aria-pressed="true"] .i-hide { display: block; }
.vh-caps { font-size: 14px; font-weight: 700; color: var(--amber); }
.vh-caps:empty { display: none; }

.vh-msg { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px; padding: 12px 14px; border-radius: var(--radius-s); font-size: 15px; font-weight: 600; }
.vh-msg svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.vh-msg--error { background: var(--red-tint); color: var(--red); }
.vh-msg--ok { background: var(--green-tint); color: var(--green); }
.vh-msg--info { background: var(--blue-tint); color: var(--blue-ink); }

@media (min-width: 900px) {
	.vh-auth { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(460px, 1fr); }
	.vh-auth__brand {
		display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px;
		background: linear-gradient(180deg, rgba(12, 11, 14, .6), rgba(12, 11, 14, .05) 40%, rgba(12, 11, 14, .88)), var(--vh-photo) center / cover no-repeat, var(--bar);
	}
	.vh-auth__logo { width: 184px; }
	.vh-auth__tag { max-width: 13ch; margin: 0; font-size: clamp(30px, 3.2vw, 44px); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; color: #fff; text-wrap: balance; }
	.vh-auth__panel { display: grid; place-items: center; margin: 0; padding: 48px; border-radius: 0; }
}

/* ---------- Shell ---------- */
.vh-app { min-height: 100dvh; }
.vh-top {
	position: sticky; top: 0; z-index: 20;
	display: flex; align-items: center; gap: 10px;
	min-height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) 12px 0 16px;
	background: var(--bar); color: var(--bar-ink);
}
.vh-top__mark { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.vh-top__title { flex: 1; min-width: 0; margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vh-top__btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: inherit; }
.vh-top__btn:hover { background: rgba(255, 255, 255, .08); }
.vh-top__btn svg { width: 24px; height: 24px; }
.vh-dot { position: absolute; top: 6px; right: 5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--sky); color: #08141c; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

.vh-main { padding: 16px 16px calc(var(--nav-h) + var(--safe-b) + 28px); max-width: 760px; margin: 0 auto; }

.vh-nav {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
	display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
	padding-bottom: var(--safe-b);
	background: var(--surface); border-top: 1px solid var(--line);
}
.vh-nav a {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
	min-height: var(--nav-h); color: var(--ink-3); text-decoration: none; font-size: 12px; font-weight: 600;
}
.vh-nav a svg { width: 24px; height: 24px; }
.vh-nav a[aria-current="page"] { color: var(--blue-ink); }
.vh-nav a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--blue); }
.vh-nav .vh-dot { top: 6px; right: calc(50% - 22px); }

@media (min-width: 960px) {
	.vh-app { display: grid; grid-template-columns: 232px 1fr; grid-template-rows: auto 1fr; }
	.vh-top { grid-column: 1 / -1; }
	.vh-nav {
		position: sticky; top: calc(var(--top-h) + var(--safe-t)); align-self: start;
		grid-auto-flow: row; grid-auto-rows: min-content; align-content: start; gap: 2px; height: calc(100dvh - var(--top-h));
		padding: 16px 12px; border-top: 0; border-right: 1px solid var(--line); background: var(--surface-2);
	}
	.vh-nav a { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 12px; font-size: 15px; }
	.vh-nav a:hover { background: var(--sunk); }
	.vh-nav a[aria-current="page"] { background: var(--blue-tint); }
	.vh-nav a[aria-current="page"]::before { display: none; }
	.vh-nav .vh-dot { position: static; margin-left: auto; }
	.vh-main { padding: 28px 32px 48px; width: 100%; }
}

/* ---------- Type & blocks ---------- */
.vh-h1 { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.vh-sub { margin: 4px 0 0; color: var(--ink-3); }
.vh-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.vh-sec { margin: 26px 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.vh-sec:first-child { margin-top: 4px; }
.vh-sec small { font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 500; }
.vh-muted { color: var(--ink-3); }
.vh-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.vh-pad { padding: 16px; }
.vh-stack > * + * { margin-top: 10px; }

.vh-alert { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--red-tint); color: var(--red); font-weight: 600; }
.vh-note { padding: 12px 14px; border-radius: var(--radius-s); background: var(--sunk); color: var(--ink-2); font-size: 15px; }
.vh-offline { position: sticky; top: calc(var(--top-h) + var(--safe-t)); z-index: 15; padding: 8px 16px; background: var(--amber-tint); color: var(--amber); font-size: 14px; font-weight: 600; text-align: center; }

/* Summary strip */
.vh-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 6px; }
.vh-stat { padding: 12px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); }
.vh-stat b { font-variant-numeric: tabular-nums; display: block; font-size: 24px; line-height: 1.1; font-weight: 700; }
.vh-stat span { font-size: 13px; color: var(--ink-3); }

/* Chips / segmented */
.vh-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 4px; padding: 2px 16px 8px; }
.vh-chips::-webkit-scrollbar { display: none; }
.vh-chip { flex: none; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 20px; background: var(--surface); color: var(--ink-2); font-size: 15px; font-weight: 600; }
.vh-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.vh-chip .n { margin-left: 4px; opacity: .7; }

/* ---------- Plate ---------- */
.vh-plate {
	display: inline-flex; align-items: stretch; flex: none;
	border: 2px solid #111; border-radius: 6px; overflow: hidden; background: #fff; color: #111;
	font: 700 17px/1 var(--mono); letter-spacing: .06em;
}
.vh-plate::before { content: "EST"; display: grid; place-items: center; width: 22px; padding-top: 1px; background: #0B4EA2; color: #fff; font: 700 8px/1 var(--font); letter-spacing: 0; writing-mode: vertical-rl; transform: rotate(180deg); }
.vh-plate span { padding: 6px 8px 5px; }
.vh-plate--l { font-size: 24px; border-width: 2.5px; }
.vh-plate--l::before { width: 28px; font-size: 10px; }
.vh-plate--l span { padding: 8px 10px 7px; }

/* ---------- Status pill ---------- */
.vh-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.vh-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.vh-pill--new { background: var(--grey-tint); color: var(--ink-2); }
.vh-pill--started { background: var(--blue-tint); color: var(--blue-ink); }
.vh-pill--started::before { animation: vh-blink 1.6s ease-in-out infinite; }
.vh-pill--waiting { background: var(--amber-tint); color: var(--amber); }
.vh-pill--done { background: var(--green-tint); color: var(--green); }
.vh-pill--inv { background: var(--grey-tint); color: var(--ink-2); }
.vh-pill--inv::before { display: none; }
@keyframes vh-blink { 50% { opacity: .25; } }

/* ---------- Job card ---------- */
.vh-jobs { display: grid; gap: 10px; }
.vh-job {
	position: relative; display: grid; grid-template-columns: 74px 1fr; gap: 0 12px;
	padding: 14px 14px 14px 0; color: inherit; text-decoration: none;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
	transition: transform .2s var(--ease), border-color .2s;
}
.vh-job:active { transform: scale(.99); }
.vh-job:hover { border-color: var(--line-2); }
.vh-job::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--line-2); }
.vh-job[data-s="started"]::before { background: var(--blue); }
.vh-job[data-s="waiting"]::before { background: var(--amber); }
.vh-job[data-s="done"]::before { background: var(--green); }
.vh-job[data-s="done"] { background: var(--surface-2); }
.vh-job__time { padding-left: 12px; text-align: right; }
.vh-job__time b { display: block; font-size: 20px; line-height: 1.1; font-weight: 700; }
.vh-job__time span { font-size: 13px; color: var(--ink-3); }
.vh-job__body { min-width: 0; }
.vh-job__row { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.vh-job__car { margin: 8px 0 2px; font-weight: 650; }
.vh-job__svc { margin: 0; color: var(--ink-2); font-size: 15px; }
.vh-job__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.vh-job__meta span { display: inline-flex; align-items: center; gap: 5px; }
.vh-job__meta svg { width: 15px; height: 15px; }
.vh-job__take { margin-top: 12px; }
.vh-job--other { opacity: .78; }
.vh-job--other .vh-job__worker { font-weight: 600; color: var(--ink-2); }

.vh-day { position: sticky; top: calc(var(--top-h) + var(--safe-t)); z-index: 5; margin: 22px -16px 10px; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.vh-day b { font-size: 16px; font-weight: 700; }
.vh-day span { font-size: 13px; color: var(--ink-3); }
.vh-day--today b::after { content: "täna"; margin-left: 8px; padding: 2px 8px; border-radius: 10px; background: var(--blue); color: #fff; font-size: 12px; vertical-align: 2px; }
@media (min-width: 960px) { .vh-day { margin-left: 0; margin-right: 0; padding-left: 4px; padding-right: 4px; } }

.vh-empty { padding: 36px 20px; text-align: center; color: var(--ink-3); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.vh-empty svg { width: 40px; height: 40px; margin: 0 auto 10px; opacity: .6; }
.vh-empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

/* ---------- Buttons ---------- */
.vh-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 18px; border: 1.5px solid transparent; border-radius: 12px;
	font-size: 16px; font-weight: 700; text-decoration: none; white-space: nowrap;
	transition: background-color .15s, border-color .15s, transform .15s var(--ease);
}
.vh-btn:active { transform: scale(.98); }
.vh-btn svg { width: 20px; height: 20px; flex: none; }
.vh-btn--primary { background: var(--blue); color: #fff; }
.vh-btn--primary:hover { background: var(--blue-hover); }
.vh-btn--go { background: var(--green); color: #fff; }
@media (prefers-color-scheme: dark) { .vh-btn--go { background: #1F8A4C; } }
.vh-btn--ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.vh-btn--ghost:hover { border-color: var(--ink-3); }
.vh-btn--warn { background: var(--amber-tint); color: var(--amber); border-color: transparent; }
.vh-btn--danger { background: transparent; color: var(--red); }
.vh-btn--s { min-height: 40px; padding: 0 14px; font-size: 15px; border-radius: 10px; }
.vh-btn--block { width: 100%; }
.vh-btn--xl { min-height: 60px; font-size: 18px; border-radius: 14px; }
.vh-btn[disabled], .vh-btn[aria-busy="true"] { opacity: .55; pointer-events: none; }
.vh-icon-btn { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink-2); }
.vh-icon-btn svg { width: 20px; height: 20px; }
.vh-icon-btn--danger { color: var(--red); }
.vh-actions { display: grid; gap: 8px; grid-template-columns: 1fr; }
.vh-actions--2 { grid-template-columns: 1fr 1fr; }

/* ---------- Job detail ---------- */
.vh-back { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; margin: -6px 0 8px -8px; padding: 0 10px 0 4px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); font-weight: 600; }
.vh-back svg { width: 22px; height: 22px; }
.vh-hero { padding: 18px 16px 16px; }
.vh-hero__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.vh-hero__car { margin: 12px 0 0; font-size: 20px; font-weight: 700; line-height: 1.2; }
.vh-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px 16px; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); }
.vh-facts div { min-width: 0; }
.vh-facts dt { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.vh-facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.vh-facts .wide { grid-column: 1 / -1; }
.vh-facts dd button { padding: 0; border: 0; background: none; color: var(--blue-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.vh-cta { margin: 12px 0 0; }
.vh-readonly { margin: 12px 0 0; }

.vh-tabs { position: sticky; top: calc(var(--top-h) + var(--safe-t)); z-index: 6; display: flex; gap: 4px; margin: 16px -16px 14px; padding: 8px 16px; overflow-x: auto; scrollbar-width: none; background: var(--bg); }
.vh-tabs::-webkit-scrollbar { display: none; }
.vh-tab { flex: 1 0 auto; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-3); font-weight: 700; font-size: 15px; white-space: nowrap; }
.vh-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); outline: 1px solid var(--line); }
.vh-tab .n { display: inline-block; min-width: 20px; height: 20px; margin-left: 4px; padding: 0 6px; border-radius: 10px; background: var(--sunk); font-size: 12px; line-height: 20px; }
.vh-tab[aria-selected="true"] .n { background: var(--blue); color: #fff; }
@media (min-width: 960px) { .vh-tabs { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; } }

.vh-list { list-style: none; margin: 0; padding: 0; }
.vh-list > li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.vh-list > li:first-child { border-top: 0; }
.vh-list__main { flex: 1; min-width: 0; }
.vh-list__main b { display: block; font-weight: 650; }
.vh-list__main small { display: block; color: var(--ink-3); font-size: 14px; }

.vh-quote { position: relative; margin: 0; padding: 14px 16px 14px 44px; border-radius: var(--radius); background: var(--amber-tint); color: var(--ink); font-size: 16px; }
.vh-quote::before { content: "”"; position: absolute; left: 14px; top: 2px; font: 700 40px/1 Georgia, serif; color: var(--amber); }
.vh-quote small { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--amber); }

.vh-contact { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.vh-contact__who { flex: 1; min-width: 0; }
.vh-contact__who b { display: block; }
.vh-contact__who a { color: var(--ink-2); text-decoration: none; font-size: 15px; }

/* ---------- Forms ---------- */
.vh-form { display: grid; gap: 14px; }
.vh-field { display: grid; gap: 6px; }
.vh-field > span { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.vh-field > span small { font-weight: 500; color: var(--ink-3); }
.vh-input, .vh-field input, .vh-field select, .vh-field textarea {
	width: 100%; min-height: 50px; padding: 12px 14px;
	border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink);
	font-size: 17px; /* ≥16px: no zoom on iOS */
}
.vh-field textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
.vh-input:focus, .vh-field input:focus, .vh-field select:focus, .vh-field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 25%, transparent); }
.vh-code { font-family: var(--mono) !important; letter-spacing: .04em; text-transform: uppercase; }
.vh-code::placeholder { text-transform: none; font-family: var(--font); letter-spacing: 0; }
.vh-row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.vh-err { color: var(--red); font-size: 14px; font-weight: 600; }

.vh-qty { justify-self: start; display: inline-flex; align-items: stretch; border: 1.5px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--surface); }
.vh-qty button { width: 48px; border: 0; background: var(--surface-2); color: var(--ink); font-size: 22px; font-weight: 600; }
.vh-qty button:active { background: var(--sunk); }
.vh-qty input { width: 64px; min-height: 48px; border: 0; border-inline: 1px solid var(--line); background: transparent; text-align: center; font-size: 18px; font-weight: 700; }
.vh-qty input:focus { outline: 2px solid var(--blue); outline-offset: -2px; }
.vh-qty--s button { width: 40px; font-size: 20px; }
.vh-qty--s input { width: 52px; min-height: 40px; font-size: 16px; }

.vh-addpart { padding: 16px; display: grid; gap: 12px; }
.vh-addpart__qty { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.vh-addpart__qty .vh-field { flex: 1; min-width: 100px; }
.vh-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.vh-suggest button { min-height: 36px; padding: 0 12px; border: 1px dashed var(--line-2); border-radius: 18px; background: var(--surface-2); color: var(--ink-2); font-size: 14px; }
.vh-suggest code { font-family: var(--mono); font-weight: 700; color: var(--ink); }

.vh-part { flex-wrap: wrap; row-gap: 10px; }
.vh-part .vh-list__main { flex: 1 1 160px; }
.vh-part__tools { margin-left: auto; }
.vh-part code { font: 700 15px/1.3 var(--mono); letter-spacing: .03em; }
.vh-part__tools { display: flex; align-items: center; gap: 8px; }
.vh-part__price { font-weight: 700; }

.vh-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.vh-timeline li { position: relative; padding: 0 0 18px 16px; }
.vh-timeline li::before { content: ""; position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--blue); }
.vh-timeline b { display: block; }
.vh-timeline p { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }

.vh-cmt { padding: 14px 16px; border-top: 1px solid var(--line); }
.vh-cmt:first-child { border-top: 0; }
.vh-cmt header { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-3); margin-bottom: 4px; }
.vh-cmt header b { color: var(--ink-2); }
.vh-cmt p { margin: 0; white-space: pre-wrap; }

/* ---------- Worksheet ---------- */
.vh-sheet-sec { padding: 4px 0; }
.vh-sheet-sec h3 { margin: 0; padding: 14px 16px 6px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.vh-line { display: grid; grid-template-columns: 1fr 72px 110px 44px; gap: 8px; align-items: center; padding: 8px 16px; }
.vh-line .vh-input { min-height: 44px; padding: 8px 10px; font-size: 16px; }
.vh-line__desc { min-width: 0; }
.vh-line__desc small { display: block; color: var(--ink-3); font-size: 13px; }
.vh-line__desc code { font-family: var(--mono); font-weight: 700; }
.vh-line__qty { text-align: center; font-weight: 700; }
.vh-price { position: relative; }
.vh-price .vh-input { padding-right: 26px; text-align: right; font-weight: 700; }
.vh-price::after { content: "€"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.vh-price .vh-input:placeholder-shown { border-color: var(--amber); background: var(--amber-tint); }
.vh-line__sum { grid-column: 3 / 4; text-align: right; font-size: 13px; color: var(--ink-3); margin-top: -4px; }
.vh-totals { padding: 14px 16px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.vh-totals div { display: flex; justify-content: space-between; color: var(--ink-2); }
.vh-totals .big { margin-top: 4px; color: var(--ink); font-size: 22px; font-weight: 700; }
@media (max-width: 480px) {
	/* Row 1: description. Row 2: amount · price · remove. */
	.vh-line { grid-template-columns: 72px 1fr 44px; row-gap: 6px; padding-top: 10px; padding-bottom: 10px; }
	.vh-line + .vh-line { border-top: 1px dashed var(--line); }
	.vh-line__desc { grid-column: 1 / -1; }
	.vh-line__qty { text-align: left; color: var(--ink-2); }
}

.vh-sticky-bar { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); z-index: 8; margin-top: 16px; padding: 10px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(0, 0, 0, .12); }
@media (min-width: 960px) { .vh-sticky-bar { bottom: 16px; } }

/* ---------- Notices ---------- */
.vh-notice { display: flex; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.vh-notice:first-child { border-top: 0; }
.vh-notice__icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--sunk); color: var(--ink-2); }
.vh-notice__icon svg { width: 20px; height: 20px; }
.vh-notice[data-type="assigned"] .vh-notice__icon { background: var(--blue-tint); color: var(--blue-ink); }
.vh-notice[data-type="done"] .vh-notice__icon { background: var(--green-tint); color: var(--green); }
.vh-notice[data-type="cancelled"] .vh-notice__icon, .vh-notice[data-type="unassigned"] .vh-notice__icon { background: var(--red-tint); color: var(--red); }
.vh-notice[data-type="changed"] .vh-notice__icon { background: var(--amber-tint); color: var(--amber); }
.vh-notice__text { flex: 1; min-width: 0; }
.vh-notice__text b { display: block; }
.vh-notice__text span { display: block; color: var(--ink-2); font-size: 15px; }
.vh-notice__text time { display: block; margin-top: 2px; color: var(--ink-3); font-size: 13px; }
.vh-notice--unread { background: color-mix(in srgb, var(--blue-tint) 55%, var(--surface)); }
.vh-notice--unread .vh-notice__text b::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--sky); vertical-align: 2px; }

/* ---------- Toast & dialog ---------- */
.vh-toasts { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); z-index: 50; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
@media (min-width: 960px) { .vh-toasts { bottom: 24px; left: auto; right: 24px; justify-items: end; } }
.vh-toast { display: flex; align-items: center; gap: 12px; max-width: 520px; padding: 12px 12px 12px 16px; border-radius: 14px; background: #1B1A1F; color: #F4F3EF; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-weight: 600; pointer-events: auto; animation: vh-in .35s var(--ease); }
.vh-toast--err { background: #8C1D18; }
.vh-toast button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 700; }
@keyframes vh-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }

.vh-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.vh-dialog::backdrop { background: rgba(12, 11, 14, .55); }
.vh-dialog__body { padding: 22px 20px 8px; }
.vh-dialog__body h2 { margin: 0 0 8px; font-size: 20px; }
.vh-dialog__body p { margin: 0 0 8px; color: var(--ink-2); }
.vh-dialog__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 20px 20px; }

/* ---------- Profile ---------- */
.vh-me { display: flex; align-items: center; gap: 14px; padding: 18px 16px; }
.vh-avatar { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 16px; background: var(--blue); color: #fff; font-size: 22px; font-weight: 700; }
.vh-menu a, .vh-menu button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 16px; border: 0; border-top: 1px solid var(--line); background: none; color: inherit; text-align: left; text-decoration: none; font-weight: 600; }
.vh-menu > :first-child { border-top: 0; }
.vh-menu svg { width: 22px; height: 22px; color: var(--ink-3); }
.vh-menu .go { margin-left: auto; color: var(--ink-3); }

.vh-skel { height: 104px; border-radius: var(--radius); background: linear-gradient(90deg, var(--sunk), var(--surface-2), var(--sunk)); background-size: 200% 100%; animation: vh-skel 1.2s linear infinite; }
@keyframes vh-skel { to { background-position: -200% 0; } }

.vh-view { animation: vh-fade .25s var(--ease); }
@keyframes vh-fade { from { opacity: 0; transform: translateY(4px); } }

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