/* Qupio Korjaamo – /korjaamohallinta */
:root { --a: #1F6FEB; --ink: #15172b; --muted: #646a80; --line: #e5e7ef; --soft: #f5f6fa; --ok: #166534; --okbg: #dcfce7; --err: #991b1b; --errbg: #fee2e2; --warn: #7a4b00; --warnbg: #fff4d6; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--soft); }
a { color: var(--a); }
h1 { font-size: 1.55rem; margin: 0 0 6px; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 0 0 10px; }
code { background: var(--soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.qh-muted { color: var(--muted); font-size: .92rem; margin: 0; }
.qh-nowrap { white-space: nowrap; }

/* Yläpalkki */
.qh-top { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; }
.qh-top__in { max-width: 1320px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.qh-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.qh-brand > span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, var(--a), color-mix(in srgb, var(--a) 55%, #22d3ee)); }
.qh-brand b { display: block; line-height: 1.15; }
.qh-brand small { display: block; font-weight: 500; font-size: .74rem; opacity: .65; }
.qh-nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.qh-nav a { color: rgba(255,255,255,.75); text-decoration: none; padding: 8px 9px; border-radius: 9px; font-weight: 600; font-size: .92rem; position: relative; }
.qh-nav a:hover, .qh-nav a[aria-current] { background: rgba(255,255,255,.12); color: #fff; }
.qh-nav em { font-style: normal; margin-left: 6px; background: #f59e0b; color: #111; border-radius: 999px; padding: 0 7px; font-size: .75rem; font-weight: 800; }
.qh-user { display: flex; gap: 14px; font-size: .88rem; }
.qh-user a { color: rgba(255,255,255,.75); }

.qh-main { max-width: 1320px; margin: 0 auto; padding: 24px 20px 40px; }
.qh-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.qh-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.qh-acts form { margin: 0; }
.qh-inline { display: inline; margin: 0; }
.qh-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 18px; }
.qh-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.qh-grid2 > .qh-card { margin-bottom: 0; }
.qh-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.qh-empty { padding: 30px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: 16px; }
.qh-scroll { overflow-x: auto; }

.qh-alert { padding: 12px 16px; border-radius: 12px; margin: 0 0 16px; font-weight: 500; }
.qh-alert--ok { background: var(--okbg); color: var(--ok); }
.qh-alert--err { background: var(--errbg); color: var(--err); }
.qh-alert--warn { background: var(--warnbg); color: var(--warn); }

.qh-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.qh-btn:hover { border-color: var(--a); color: var(--a); }
.qh-btn--p { background: var(--a); border-color: var(--a); color: #fff; }
.qh-btn--p:hover { color: #fff; filter: brightness(1.07); }
.qh-btn--danger { color: #b42318; border-color: #f3c7c3; }
.qh-btn--ghost { background: transparent; border-color: transparent; color: var(--muted); }
.qh-btn--s { padding: 5px 10px; font-size: .85rem; }
.qh-btn--block { width: 100%; justify-content: center; }

.qh-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 12px; }
.qh-form label small { font-weight: 400; color: var(--muted); }
.qh-form input:not([type=checkbox]):not([type=color]), .qh-form select, .qh-form textarea, .qh-filter input, .qh-filter select, .qh-acts input[type=date], .qh-login input:not([type=checkbox]) {
    display: block; width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid #ccd1dd; border-radius: 9px; font: inherit; font-weight: 400; background: #fff; color: var(--ink); }
.qh-acts input[type=date] { margin: 0; width: auto; }
.qh-form input[type=color] { display: block; margin-top: 5px; width: 64px; height: 38px; border: 1px solid #ccd1dd; border-radius: 9px; padding: 3px; }
.qh-form input:focus, .qh-form select:focus, .qh-form textarea:focus { outline: 2px solid color-mix(in srgb, var(--a) 30%, transparent); border-color: var(--a); }
.qh-check { display: flex !important; gap: 8px; align-items: center; font-weight: 500 !important; }
.qh-check input { width: 17px; height: 17px; accent-color: var(--a); margin: 0; }
.qh-fs { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 2px; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 0 18px; }
.qh-fs legend { font-weight: 700; font-size: .9rem; padding: 0 6px; }
.qh-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.qh-filter label { font-weight: 600; font-size: .85rem; flex: 1 1 140px; }

.qh-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.qh-table th { text-align: left; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.qh-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.qh-table tr:last-child td { border-bottom: 0; }

.qh-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: #eef0f5; color: #4b5064; white-space: nowrap; }
.qh-badge--confirmed { background: #e3ecff; color: #1d4ed8; }
.qh-badge--arrived, .qh-badge--in_progress { background: #dbeafe; color: #1e40af; }
.qh-badge--waiting_parts { background: var(--warnbg); color: var(--warn); }
.qh-badge--ready { background: var(--okbg); color: var(--ok); }
.qh-badge--pending { background: var(--warnbg); color: var(--warn); }
.qh-badge--completed { background: var(--okbg); color: var(--ok); }
.qh-badge--cancelled, .qh-badge--no_show { background: var(--errbg); color: var(--err); }
.qh-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; }
.qh-dl dt { color: var(--muted); }
.qh-dl dd { margin: 0; font-weight: 600; }

/* Viikko */
.qh-week { display: grid; grid-template-columns: repeat(7, 1fr) auto auto; gap: 8px; margin-bottom: 16px; align-items: stretch; }
.qh-week__d { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 12px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.qh-week__d small { text-transform: uppercase; color: var(--muted); font-weight: 700; font-size: .72rem; }
.qh-week__d span { font-size: .78rem; color: var(--muted); }
.qh-week__d.is-today { border-color: color-mix(in srgb, var(--a) 50%, #fff); }
.qh-week__d.is-on { background: var(--a); border-color: var(--a); color: #fff; }
.qh-week__d.is-on small, .qh-week__d.is-on span { color: rgba(255,255,255,.8); }
.qh-week__nav { align-self: center; font-size: .85rem; font-weight: 600; text-decoration: none; padding: 0 6px; }

/* Päivänäkymä */
.qh-cal { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: auto; }
.qh-cal__head, .qh-cal__body { display: grid; grid-template-columns: 58px repeat(var(--cols), minmax(170px, 1fr)); min-width: calc(58px + var(--cols) * 170px); }
.qh-cal__head { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid var(--line); }
.qh-cal__staff { padding: 12px; font-weight: 700; display: flex; align-items: center; gap: 8px; border-left: 1px solid var(--line); }
.qh-cal__staff i { width: 10px; height: 10px; border-radius: 50%; }
.qh-cal__body { height: calc(var(--h) + 16px); padding-top: 8px; }
.qh-cal__axis { position: relative; }
.qh-cal__axis span { position: absolute; right: 8px; transform: translateY(-50%); font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.qh-cal__col { position: relative; border-left: 1px solid var(--line); background: repeating-linear-gradient(135deg, #f7f7fa, #f7f7fa 6px, #f2f3f7 6px, #f2f3f7 12px); }
.qh-cal__work { position: absolute; left: 0; right: 0; background: #fff; }
.qh-cal__line { position: absolute; left: 0; right: 0; border-top: 1px solid #eef0f4; }
.qh-cal__block { position: absolute; left: 4px; right: 4px; border-radius: 8px; background: repeating-linear-gradient(45deg, #fde8e8, #fde8e8 8px, #fbd5d5 8px, #fbd5d5 16px); color: #8a1c1c; font-size: .78rem; font-weight: 700; padding: 4px 8px; overflow: hidden; z-index: 1; }
.qh-cal__buf { position: absolute; left: 6px; right: 6px; background: repeating-linear-gradient(90deg, #eceef4, #eceef4 4px, transparent 4px, transparent 8px); border-radius: 0 0 6px 6px; z-index: 1; }
.qh-ev { --c: var(--a); position: absolute; left: 4px; right: 4px; z-index: 2; border-radius: 9px; padding: 5px 8px; overflow: hidden; text-decoration: none; color: var(--ink);
    background: color-mix(in srgb, var(--c) 14%, #fff); border-left: 4px solid var(--c); box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: box-shadow .15s, transform .15s; }
.qh-ev:hover { box-shadow: 0 8px 18px -10px rgba(0,0,0,.35); transform: translateY(-1px); z-index: 4; }
.qh-ev b { display: block; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qh-ev span { display: block; font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qh-ev--pending { background: repeating-linear-gradient(135deg, #fff8e6, #fff8e6 8px, #fff1cc 8px, #fff1cc 16px); border-left-color: #f59e0b; }
.qh-ev--pending_payment { opacity: .6; border-left-style: dashed; }
.qh-ev--completed { opacity: .7; }
.qh-ev--no_show { opacity: .55; text-decoration: line-through; }
.qh-cal__now { position: absolute; left: 0; right: 0; border-top: 2px solid #ef4444; z-index: 5; }
.qh-cal__now::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }

/* Uusi varaus */
.qh-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
.qh-slot { padding: 8px 4px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.qh-slot:hover, .qh-slot.is-on { border-color: var(--a); background: var(--a); color: #fff; }

/* Tekijät */
.qh-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.qh-person { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; }
.qh-person.is-off { opacity: .55; }
.qh-person .qh-acts { margin-top: 10px; }
.qh-avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.2rem; overflow: hidden; margin-bottom: 6px; }
.qh-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Aukioloajat */
.qh-hours { display: grid; gap: 6px; }
.qh-hours__h, .qh-hours__r { display: grid; grid-template-columns: 120px repeat(4, minmax(0, 1fr)) 70px; gap: 8px; align-items: center; }
.qh-hours__h span { font-size: .75rem; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.qh-hours__r input[type=time] { margin: 0 !important; }
.qh-hours__r .qh-check { margin: 0; justify-content: center; }

.qh-list { list-style: none; margin: 0; padding: 0; }
.qh-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.qh-checklist { list-style: none; margin: 0; padding: 0; }
.qh-checklist li { display: flex; gap: 10px; align-items: center; padding: 7px 0; }
.qh-checklist span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; background: var(--warnbg); color: var(--warn); }
.qh-checklist .is-ok span { background: var(--okbg); color: var(--ok); }
.qh-guide details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.qh-guide details:last-child { border-bottom: 0; }
.qh-guide summary { font-weight: 700; cursor: pointer; }
.qh-guide p { margin: 10px 0 0; color: #3c4156; }
.qh-credit { text-align: center; font-size: .78rem; color: #9aa0b4; padding: 0 0 26px; }
.qh-credit a { color: inherit; }

/* Kirjautuminen */
.qh-login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: #f6f6fb; }
.qh-login__side { color: #fff; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between;
    background: radial-gradient(800px 500px at 100% 0, color-mix(in srgb, var(--a) 55%, transparent), transparent 65%), radial-gradient(700px 600px at 0 100%, rgba(34,211,238,.25), transparent 60%), linear-gradient(160deg, #0f1124, #1a1d3d); }
.qh-login__brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.05rem; }
.qh-login__logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--a), color-mix(in srgb, var(--a) 50%, #22d3ee)); }
.qh-login__hero h1 { font-size: clamp(2rem, 3vw, 2.8rem); line-height: 1.12; margin: 0 0 14px; }
.qh-login__hero h1 span { background: linear-gradient(90deg, color-mix(in srgb, var(--a) 40%, #fff), #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.qh-login__hero p { color: rgba(255,255,255,.72); max-width: 420px; font-size: 1.05rem; }
.qh-login__foot { color: rgba(255,255,255,.45); font-size: .85rem; }
.qh-login__main { display: grid; place-items: center; padding: 30px 20px; }
.qh-login__card { width: min(400px, 100%); }
.qh-login__card h2 { font-size: 1.6rem; margin: 0 0 4px; }
.qh-login__card .qh-muted { margin-bottom: 22px; }
.qh-login__card label { display: block; font-weight: 600; margin-bottom: 14px; font-size: .92rem; }
.qh-login__card input:not([type=checkbox]) { height: 48px; border-radius: 12px; border-width: 1.5px; }
.qh-login__card .qh-btn--p { height: 50px; border-radius: 12px; font-size: 1rem; margin-top: 6px; }
.qh-login__lost { text-align: center; font-size: .9rem; }

@media (max-width: 900px) {
    .qh-grid2 { grid-template-columns: 1fr; }
    .qh-week { grid-template-columns: repeat(7, 1fr); }
    .qh-week__nav { display: none; }
    .qh-login { grid-template-columns: 1fr; }
    .qh-login__side { display: none; }
    .qh-hours__h { display: none; }
    .qh-hours__r { grid-template-columns: 1fr 1fr; padding: 8px 0; border-bottom: 1px solid var(--line); }
    .qh-hours__r b { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .qh-grid { grid-template-columns: 1fr; }
    .qh-main { padding: 16px 12px 30px; }
    .qh-week__d b { font-size: .8rem; }
    .qh-week__d span { display: none; }
}

/* Tiivis päivänäkymä + päivän varaukset (0.2.2) */
.qh-day { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.qh-day .qh-cal { margin: 0; }
.qh-cal__head .qh-cal__staff { padding: 9px 12px; }
.qh-ev { padding: 3px 8px; }
.qh-ev--short { display: flex; gap: 6px; align-items: center; }
.qh-ev--short b, .qh-ev--short span { display: inline; }
.qh-ev--short span::before { content: "· "; }
.qh-agenda { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; }
.qh-agenda h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 10px; }
.qh-agenda h2 span { background: var(--a); color: #fff; border-radius: 999px; padding: 0 9px; font-size: .78rem; }
.qh-agenda__i { display: flex; gap: 12px; padding: 10px 10px 10px 12px; margin: 0 -6px 4px; border-radius: 12px; text-decoration: none; color: var(--ink); border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 7%, #fff); }
.qh-agenda__i:hover { background: color-mix(in srgb, var(--c) 14%, #fff); }
.qh-agenda__i.is-past { opacity: .55; }
.qh-agenda__i time { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 44px; line-height: 1.2; }
.qh-agenda__i time small { display: block; font-weight: 500; color: var(--muted); font-size: .78rem; }
.qh-agenda__i > span { font-size: .86rem; color: var(--muted); line-height: 1.35; }
.qh-agenda__i b { display: block; color: var(--ink); font-size: .95rem; }
.qh-agenda__cx { margin-top: 10px; font-size: .82rem; }
@media (max-width: 1000px) { .qh-day { grid-template-columns: 1fr; } .qh-agenda { position: static; max-height: none; order: -1; } }

/* Värit ja ulkoasu (0.3.0) */
.qh-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.qh-preset { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; color: var(--ink); }
.qh-preset:hover { border-color: var(--a); }
.qh-preset i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid; display: grid; place-items: center; }
.qh-preset b { width: 12px; height: 12px; border-radius: 50%; }
.qh-look { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
.qh-color { display: grid; grid-template-columns: minmax(0, 1fr) 46px 104px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.qh-color > span b { display: block; font-size: .9rem; }
.qh-color > span small { display: block; color: var(--muted); font-size: .78rem; }
.qh-form .qh-color input[type=color] { width: 46px; height: 38px; margin: 0; padding: 2px; }
.qh-form .qh-color input[type=text] { margin: 0; font-family: ui-monospace, Consolas, monospace; text-transform: uppercase; }
.qh-color input:disabled { opacity: .45; }
.qh-form .qh-color__auto { grid-column: 2 / -1; margin: 0; font-size: .82rem; }
.qh-look__preview { position: sticky; top: 80px; background: repeating-conic-gradient(#f3f4f8 0% 25%, #fff 0% 50%) 50% / 18px 18px; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.qh-look__preview > small { display: block; margin-bottom: 8px; }
.qh-look__preview .qkj-shell { padding: 18px; }
.qh-look__preview .qkj--plain .qkj-shell { padding: 0; }
.qh-look__preview .qkj-title { font-size: 1.3rem; }
.qh-prev__row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; align-items: start; }
.qh-prev__row .qkj-cal { padding: 10px; }
.qh-prev__row .qkj-slots__grid { grid-template-columns: 1fr; }
@media (max-width: 1000px) { .qh-look { grid-template-columns: 1fr; } .qh-look__preview { position: static; } }

/* Tekijän kuva (0.3.1) */
.qh-photo { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 14px; align-items: center; grid-column: 1 / -1; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; margin-bottom: 12px; }
.qh-photo .qh-avatar { grid-row: span 2; margin: 0; }
.qh-photo label { margin: 0; }
.qh-photo input[type=file] { display: block; margin-top: 6px; font: inherit; font-size: .88rem; }

/* ---------- Korjaamo: rekisterikilpi, työjono, autot ---------- */
.qh-plate { display: inline-block; font: 800 .86rem/1 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .06em; padding: 5px 8px 5px 18px; border: 2px solid #111827; border-radius: 6px; background: #fff linear-gradient(90deg, #1d4ed8 0 11px, transparent 11px); color: #111827; text-decoration: none; white-space: nowrap; vertical-align: middle; }
a.qh-plate:hover { border-color: var(--a); }
.qh-plate--lg { font-size: 1.15rem; padding: 6px 10px 6px 22px; background: #fff linear-gradient(90deg, #1d4ed8 0 13px, transparent 13px); }
h1 .qh-plate { font-size: 1.05rem; }
.qh-reg { font-weight: 800; letter-spacing: .04em; }
.qh-quick { margin-bottom: 14px; }
.qh-quick label { flex: 0 1 320px; }
.qh-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.qh-col { background: #eceef4; border-radius: 16px; padding: 12px; min-height: 140px; }
.qh-col h2 { font-size: .95rem; display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 10px; }
.qh-col h2 span { background: #fff; border-radius: 999px; padding: 1px 9px; font-size: .8rem; }
.qh-col--valmis { background: #e5f6ea; }
.qh-col--luovutettu { opacity: .8; }
.qh-col__empty { color: var(--muted); margin: 6px 4px; }
.qh-job { background: #fff; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--c, var(--a)); margin-bottom: 10px; box-shadow: 0 1px 2px rgba(15, 18, 34, .05); }
.qh-job__main { display: grid; gap: 4px; padding: 11px 12px 10px; color: var(--ink); text-decoration: none; }
.qh-job__main:hover b { color: var(--a); }
.qh-job__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.qh-job__top time { font-weight: 700; font-size: .85rem; color: var(--muted); }
.qh-job b { font-size: .98rem; line-height: 1.3; }
.qh-job__svc { font-size: .88rem; }
.qh-job__meta { font-size: .82rem; color: var(--muted); }
.qh-job__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.qh-job__note { font-size: .82rem; background: var(--soft); border-radius: 8px; padding: 6px 8px; color: #3b4054; }
.qh-tag { font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #f1f3f8; color: #4b5064; }
.qh-tag--tyre { background: #e9e3ff; color: #4c1d95; }
.qh-tag--warn { background: var(--warnbg); color: var(--warn); }
.qh-job__acts { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 11px; }
.qh-job__acts form { margin: 0; }
.qh-job--completed, .qh-job--no_show { opacity: .7; }
.qh-hist li a { color: var(--ink); text-decoration: none; }
.qh-hist li a:hover b { color: var(--a); }
.qh-fs legend small { font-weight: 400; color: var(--muted); }
@media (max-width: 1100px) { .qh-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .qh-board { grid-template-columns: 1fr; } .qh-col--luovutettu { order: 5; } }

/* ---------- 0.2.0: kalenterin pikamuokkaus, laskutus ---------- */
.qh-cal__tip { margin: -4px 0 10px; font-size: .84rem; }
.qh-cal--compact .qh-ev { padding: 2px 7px 6px; border-radius: 7px; cursor: pointer; }
.qh-cal--compact .qh-ev b { font-size: .74rem; }
.qh-cal--compact .qh-ev span { font-size: .7rem; }
.qh-cal--compact .qh-cal__head { font-size: .85rem; }
.qh-ev__grip { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; background: linear-gradient(transparent 2px, color-mix(in srgb, var(--c) 35%, transparent) 2px 4px, transparent 4px); opacity: 0; transition: opacity .15s; touch-action: none; }
.qh-ev:hover .qh-ev__grip, .qh-ev.is-resizing .qh-ev__grip { opacity: 1; }
.qh-ev.is-resizing { z-index: 6; box-shadow: 0 0 0 2px var(--c); }
.qh-ev.is-resizing::after { content: attr(data-dur); position: absolute; right: 6px; bottom: 8px; font-size: .72rem; font-weight: 800; background: #fff; padding: 1px 6px; border-radius: 6px; }
.qh-qe { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 24px)); box-shadow: 0 30px 70px -20px rgba(10, 12, 30, .45); }
.qh-qe::backdrop { background: rgba(15, 16, 30, .45); }
.qh-qe form { padding: 20px 22px; display: grid; gap: 12px; }
.qh-qe__head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.qh-qe__head h2 { margin: 0 0 2px; }
.qh-qe__x { border: 0; background: var(--soft); width: 34px; height: 34px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; }
.qh-dur { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; font-weight: 500; }
.qh-dur input { width: 90px !important; text-align: center; }
.qh-bill { margin-top: 16px; }
.qh-mech { max-width: 420px; margin-bottom: 12px; }
.qh-lines input[type=text] { width: 100%; min-width: 0; }
.qh-lines td:first-child { min-width: 220px; }
.qh-lines .qh-num { width: 90px !important; text-align: right; }
.qh-lines tr.is-blank input::placeholder { color: #9aa0ad; }
.qh-billsum { display: flex; justify-content: flex-end; gap: 18px; align-items: baseline; padding: 12px 4px; border-top: 2px solid var(--ink); margin-top: 10px; color: var(--muted); }
.qh-billsum b { color: var(--ink); font-size: 1.15rem; }
.qh-billacts { justify-content: flex-end; }
.qh-logo { display: grid; grid-template-columns: 180px 1fr auto; gap: 14px; align-items: center; margin: 4px 0 14px; }
.qh-logo__prev { height: 70px; border: 1px dashed var(--line); border-radius: 10px; display: grid; place-items: center; color: var(--muted); font-size: .85rem; background: #fff; overflow: hidden; }
.qh-logo__prev img { max-width: 160px; max-height: 60px; object-fit: contain; }
.r { text-align: right; }
@media (max-width: 700px) { .qh-logo { grid-template-columns: 1fr; } }
.qh-ev.is-moving { z-index: 7; opacity: .92; box-shadow: 0 12px 26px -10px rgba(0,0,0,.45), 0 0 0 2px var(--c); cursor: grabbing; }
.qh-ev.is-moving::after { content: attr(data-dur); position: absolute; right: 6px; top: 4px; font-size: .72rem; font-weight: 800; background: #fff; padding: 1px 6px; border-radius: 6px; }
.qh-cal--compact .qh-ev { touch-action: none; user-select: none; }
.qh-qe__changed { margin: 0; background: #e3ecff; color: #1d4ed8; border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: .9rem; }
.qh-cal--compact .qh-cal__axis span { font-size: .72rem; }
.qh-cal--compact .qh-cal__head { padding-top: 6px; padding-bottom: 6px; }

/* ---------- 0.3.0: mekaanikon paneeli (digitaalinen työmääräys) ---------- */
.qh-btn--lg { padding: 13px 18px; font-size: 1rem; border-radius: 12px; }
.qh-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qh-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qh-my { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.qh-myjob { display: grid; gap: 5px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--a); border-radius: 14px; color: var(--ink); text-decoration: none; box-shadow: 0 1px 2px rgba(15, 18, 34, .05); }
.qh-myjob:hover { border-color: var(--a); }
.qh-myjob__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.qh-myjob__top time { font-weight: 700; color: var(--muted); font-size: .9rem; }
.qh-myjob b { font-size: 1.05rem; }
.qh-myjob__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.qh-myjob__go { color: var(--a); font-weight: 700; font-size: .9rem; margin-top: 2px; }
.qh-myjob--ready { border-left-color: #16a34a; }
.qh-myjob--waiting_parts { border-left-color: #f59e0b; }
.qh-myjob--completed { opacity: .65; }
.qh-wo__nav { margin: 0 0 12px; font-size: .92rem; }
.qh-wo__head { margin-bottom: 14px; }
.qh-wo__title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.qh-wo__title h1 { margin: 0; font-size: 1.35rem; }
.qh-wo__title > .qh-badge { margin-left: auto; }
.qh-wo__svc { margin: 10px 0 12px; font-weight: 600; }
.qh-wo__acts { display: flex; gap: 8px; flex-wrap: wrap; }
.qh-wo__acts form { margin: 0; }
.qh-wo__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; align-items: start; }
.qh-wo__col { display: grid; gap: 14px; }
.qh-wo .qh-card { margin: 0; }
.qh-wo h2 small { font-weight: 500; font-size: .8rem; }
.qh-note { white-space: pre-wrap; font-weight: 500 !important; background: var(--soft); border-radius: 8px; padding: 6px 9px; }
.qh-timer { font-size: 1.15rem; margin: 0 0 10px; }
.qh-timer small { color: var(--muted); font-size: .8rem; }
.qh-inline-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.qh-inline-form label { flex: 1; }
.qh-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin-bottom: 12px; }
.qh-check--big { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; }
.qh-check--big input { width: 20px; height: 20px; }
.qh-log { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; max-height: 360px; overflow: auto; }
.qh-log li { background: var(--soft); border-radius: 10px; padding: 8px 11px; white-space: normal; }
.qh-log li small { display: block; color: var(--muted); font-size: .76rem; margin-bottom: 2px; }
.qh-log--time { background: #eef4ff !important; }
.qh-log--part { background: #f4f1ff !important; }
.qh-parts, .qh-extras { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.qh-parts li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.qh-parts li span { flex: 1; display: grid; }
.qh-parts li small { color: var(--muted); }
.qh-parts li em { font-style: normal; font-weight: 700; white-space: nowrap; }
.qh-parts form { margin: 0; }
.qh-wo__sum { text-align: right; margin: 10px 0 14px; font-size: 1.05rem; }
.qh-addpart { border-top: 1px dashed var(--line); padding-top: 12px; }
.qh-extras li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; }
.qh-extras li > div:first-child { display: grid; gap: 2px; }
.qh-extras small { color: var(--muted); }
.qh-extra__st { font-size: .82rem; font-weight: 700; color: var(--warn); }
.qh-extras li.is-approved { border-color: #86efac; background: #f0fdf4; }
.qh-extras li.is-approved .qh-extra__st { color: var(--ok); }
.qh-extras li.is-declined { opacity: .6; }
.qh-extras li.is-declined .qh-extra__st { color: var(--err); }
.qh-extras + form { margin-top: 12px; }
.qh-login-st { display: block; margin-top: 4px; font-size: .78rem; }
.qh-login-st--ok { color: var(--ok); }
.qh-login-st--nouser, .qh-login-st--none { color: var(--muted); }
@media (max-width: 900px) { .qh-wo__grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
    .qh-grid--3 { grid-template-columns: 1fr 1fr; }
    .qh-grid--3 label:first-child { grid-column: 1 / -1; }
    .qh-checks { grid-template-columns: 1fr; }
    .qh-wo__acts .qh-btn, .qh-wo__acts form { flex: 1 1 100%; }
    .qh-wo__acts .qh-btn { width: 100%; justify-content: center; }
    .qh-wo__title > .qh-badge { margin-left: 0; }
}
/* Yläpalkki puhelimessa: logo ja kirjaudu ulos ylärivillä, valikko vaakasuunnassa vieritettävänä rivinä. */
@media (max-width: 760px) {
    .qh-top__in { flex-wrap: wrap; gap: 8px 12px; padding: 8px 12px; }
    .qh-brand { flex: 1; }
    .qh-user { gap: 10px; font-size: .82rem; }
    .qh-nav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px 2px; }
    .qh-nav::-webkit-scrollbar { display: none; }
    .qh-nav a { white-space: nowrap; padding: 7px 10px; font-size: .88rem; }
    .qh-main { padding: 16px 12px 32px; }
}

/* Yläpalkki yhdelle riville: alavalikot ja kapealla näytöllä Valikko-painike */
.qh-top__in { flex-wrap: nowrap; position: relative; }
.qh-nav { flex-wrap: nowrap; align-items: center; min-width: 0; }
.qh-nav a, .qh-dd__b { white-space: nowrap; }
.qh-dd { position: relative; }
.qh-dd__b { background: none; border: 0; color: rgba(255,255,255,.78); font: inherit; font-weight: 600; font-size: .92rem; padding: 8px 12px; border-radius: 9px; cursor: pointer; }
.qh-dd__b em { font-style: normal; margin-left: 6px; background: #f59e0b; color: #111; border-radius: 999px; padding: 0 7px; font-size: .75rem; font-weight: 800; }
.qh-dd__b:hover, .qh-dd__b[aria-current], .qh-dd:focus-within .qh-dd__b { background: rgba(255,255,255,.12); color: #fff; }
.qh-dd__m { display: none; position: absolute; top: 100%; left: 0; min-width: 210px; padding: 6px; background: #151a2e; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.3); z-index: 40; }
.qh-dd:hover .qh-dd__m, .qh-dd:focus-within .qh-dd__m { display: block; }
.qh-dd__m a { display: block; }
.qh-burger, .qh-only-m { display: none; }
.qh-user { white-space: nowrap; }
@media (max-width: 1100px) {
    .qh-burger { display: inline-flex; margin-left: auto; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 9px; padding: 9px 14px; font: inherit; font-weight: 700; cursor: pointer; }
    .qh-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 20px 18px; background: #0f1426; box-shadow: 0 16px 30px rgba(0,0,0,.3); z-index: 40; }
    .qh-nav.is-open { display: flex; }
    .qh-nav a { padding: 10px 12px; }
    .qh-dd__b { display: none; }
    .qh-dd__m { display: block; position: static; min-width: 0; padding: 0; background: none; border: 0; box-shadow: none; }
    .qh-user { display: none; }
    .qh-only-m { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.12); }
}
