:root {
  --brand: #0191fe;
  --accent: #fe6e01;
  --text: #192a3d;
  --muted: #66737f;
  --line: #dde4ea;
  --bg: #f4f7fa;
  --card: #ffffff;
  --ok: #168746;
  --warn: #b85000;
  --danger: #c62828;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body.has-actionbar { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
a { color: var(--brand); }
h1 { font-size: 1.5rem; line-height: 1.2; margin: 0; }
h2 { font-size: 1.08rem; margin: 0 0 12px; }
h3 { font-size: .95rem; margin: 0; }
code { background: #eef2f6; padding: 1px 5px; border-radius: 4px; font-size: .85em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.pre { white-space: pre-wrap; margin: 0; }

/* Yläpalkki */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: #fff; border-bottom: 3px solid var(--brand);
}
.brand img { height: 34px; display: block; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a { text-decoration: none; color: var(--text); padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.topbar nav a.active { background: #e8f4ff; color: var(--brand); }

main { max-width: 860px; margin: 0 auto; padding: 16px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }

/* Kortit ja lomakkeet */
.card { background: var(--card); border-radius: var(--radius); padding: 18px 16px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(25, 42, 61, .06), 0 0 0 1px rgba(25, 42, 61, .04); }
.card.narrow { max-width: 420px; margin: 40px auto; }
.grid { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 620px) { .grid { grid-template-columns: 1fr 1fr; } .span2 { grid-column: span 2; } }
label { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
input:not([type=radio]):not([type=checkbox]):not([type=file]):not([type=color]), select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 11px 12px; font: inherit; font-size: 16px; color: var(--text);
  background: #fff; border: 1px solid #cfd8e1; border-radius: 9px; appearance: none; -webkit-appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input[type=date] { min-height: 46px; }
input[type=color] { display: block; margin-top: 4px; width: 64px; height: 42px; border: 1px solid #cfd8e1; border-radius: 9px; padding: 3px; background: #fff; }
textarea { resize: vertical; min-height: 80px; }
textarea.mono { font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(1, 145, 254, .18); }
.hint { display: block; font-weight: 400; font-size: .8rem; margin-top: 4px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); }
label.check input { width: 20px; height: 20px; }

/* Painikkeet */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px;
  border: 1px solid #cfd8e1; border-radius: 10px; background: #fff; color: var(--text); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--danger); border-color: #f0c4c4; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 34px; padding: 5px 11px; font-size: .85rem; }
.btn.wide { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -4px; }
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; gap: 10px; justify-content: center;
  padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); backdrop-filter: blur(8px);
}
.actionbar .btn { flex: 1; max-width: 300px; }

/* Ilmoitukset */
.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; }
.flash.ok { background: #e6f6ec; color: #0f5e31; }
.flash.error { background: #fdeaea; color: #8e1c1c; }
.ok-text { color: var(--ok); font-weight: 600; margin: 0 0 10px; }
.warn-text { color: var(--warn); background: #fff4ea; padding: 10px 12px; border-radius: 8px; margin: 0 0 12px; font-size: .92rem; }

/* Arkisto */
.search { display: flex; gap: 8px; margin-bottom: 14px; }
.search input { margin: 0 !important; }
.search select { width: auto !important; margin: 0 !important; }
.report-list, .due-list, .cl-view, .log { list-style: none; margin: 0; padding: 0; }
.report-item {
  display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 8px; background: #fff;
  border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: 0 1px 2px rgba(25, 42, 61, .06), 0 0 0 1px rgba(25, 42, 61, .04);
}
.ri-main, .ri-side { display: flex; flex-direction: column; min-width: 0; }
.ri-main span { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ri-side { align-items: flex-end; font-size: .85rem; flex-shrink: 0; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .75rem; font-weight: 700; vertical-align: middle; }
.badge.luonnos { background: #fff1e5; color: var(--warn); }
.badge.lahetetty { background: #e6f6ec; color: var(--ok); }
.due { border-left: 4px solid var(--accent); }
.due-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.due-list li:first-child { border-top: 0; }
.due-list a:first-child { flex: 1; display: flex; flex-direction: column; text-decoration: none; color: var(--text); min-width: 0; font-size: .92rem; }
.due-date { font-weight: 600; font-size: .9rem; }
.due-date.overdue { color: var(--danger); }

/* Tarkastuslista */
.cl-section { margin-top: 6px; }
.cl-section + .cl-section { margin-top: 18px; }
.cl-section-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.cl-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.cl-label { font-weight: 500; margin-bottom: 7px; }
.seg { display: flex; gap: 6px; }
.seg-opt { flex: 1; margin: 0; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span {
  display: block; text-align: center; padding: 8px 2px; border: 1px solid #cfd8e1; border-radius: 8px; font-size: .8rem;
  font-weight: 600; color: var(--muted); background: #fff; cursor: pointer; user-select: none;
}
.seg-opt.s-ok input:checked + span { background: var(--ok); border-color: var(--ok); color: #fff; }
.seg-opt.s-korjattu input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.seg-opt.s-huom input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg-opt.s-eikoske input:checked + span { background: #7d8a96; border-color: #7d8a96; color: #fff; }
.seg-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(1, 145, 254, .3); }
.note-toggle { flex: 0 0 40px; border: 1px solid #cfd8e1; border-radius: 8px; background: #fff; color: var(--muted); font-size: 1rem; cursor: pointer; }
.cl-note { display: none !important; margin-top: 8px !important; }
.cl-item.show-note .cl-note { display: block !important; }
.cl-item.show-note .note-toggle { background: #eef6ff; color: var(--brand); border-color: var(--brand); }

/* Kuvat */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 12px; }
.photo { margin: 0; }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 9px; display: block; background: #eef2f6; }
.photo input { margin-top: 6px !important; padding: 8px 10px !important; font-size: 14px !important; }
.photo label.check { margin: 6px 0 0; font-size: .85rem; }
.photo figcaption { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.photo .remove { margin-top: 6px; width: 100%; }
.file-pick { margin: 0; }
.file-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-pick span {
  display: block; text-align: center; padding: 18px; border: 2px dashed #b9c6d3; border-radius: 10px;
  color: var(--brand); font-size: 1rem; cursor: pointer; background: #f7fbff;
}

/* Raportin näkymä */
.send-card { border-top: 4px solid var(--accent); }
.send-form { display: flex; gap: 8px; flex-wrap: wrap; }
.send-form input { flex: 1 1 220px; margin: 0 !important; }
.send-form .btn { flex: 0 0 auto; }
.cols { display: grid; gap: 8px 24px; }
@media (min-width: 620px) { .cols { grid-template-columns: 1fr 1fr; } }
dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 12px; font-size: .95rem; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: #f1f7fd; border-radius: 10px; padding: 12px 14px; }
@media (min-width: 620px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts span { display: block; font-size: .78rem; color: var(--muted); }
.cl-view li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--line); }
.cl-view em { display: block; font-style: normal; color: var(--muted); font-size: .88rem; }
.pill { flex: 0 0 74px; text-align: center; font-size: .75rem; font-weight: 700; padding: 3px 0; border-radius: 99px; background: #eef2f6; color: var(--muted); }
.pill.s-ok { background: #e6f6ec; color: var(--ok); }
.pill.s-korjattu { background: #e5f2ff; color: #0168b8; }
.pill.s-huom { background: #fff1e5; color: var(--warn); }
.meas { max-width: 420px; }
.meas dd { text-align: right; font-weight: 600; }
.log li { padding: 8px 0 8px 12px; border-left: 3px solid var(--ok); margin-bottom: 8px; }
.log li.fail { border-left-color: var(--danger); }
.danger-zone { text-align: center; margin: 24px 0; }
.logo-preview { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.logo-preview img { height: 40px; }
.logo-preview label { margin: 0; }

/* ===== Versio 2: kalenteri, keikat, ajanvaraus ===== */
.flash.info { background: #eaf4ff; color: #0b4f8a; font-weight: 400; }
.center { text-align: center; }
.back { display: inline-block; margin: 0 0 10px; text-decoration: none; font-weight: 600; font-size: .95rem; }
.btn.big { min-height: 54px; font-size: 1.05rem; }
.label-like { font-size: .85rem; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: #fff !important; font-weight: 700; text-decoration: none; flex-shrink: 0; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li a { display: flex; flex-direction: column; padding: 9px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); }
.plain-list li:first-child a { border-top: 0; }

/* Alapalkki mobiilissa, yläpalkin linkit isolla näytöllä */
.tabbar { display: none; }
@media (max-width: 760px) {
  .topnav a:not(.avatar) { display: none; }
  body.has-tabbar { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  body.has-tabbar.has-actionbar { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255,255,255,.97);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(8px); }
  .has-actionbar .tabbar { display: none; }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px;
    font-size: .7rem; font-weight: 600; color: var(--muted); text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .tabbar a.active { color: var(--brand); }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
}
.topnav { align-items: center; }

/* Kalenteri */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal-head h1 { flex: 1; text-align: center; font-size: 1.2rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px;
  background: #fff; border: 1px solid var(--line); font-size: 1.5rem; line-height: 1; text-decoration: none; color: var(--text); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; background: #fff; padding: 6px; border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(25,42,61,.06), 0 0 0 1px rgba(25,42,61,.04); margin-bottom: 14px; touch-action: pan-y; }
.wd { display: flex; flex-direction: column; align-items: center; padding: 7px 0 6px; border-radius: 10px; text-decoration: none; color: var(--text); }
.wd-name { font-size: .72rem; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.wd-num { font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.wd-dots { display: flex; gap: 3px; height: 6px; }
.wd-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.wd.today .wd-num { color: var(--brand); }
.wd.sel { background: var(--brand); color: #fff; }
.wd.sel .wd-name, .wd.sel .wd-num { color: #fff; }
.wd.sel .wd-dots i { background: #fff; }
.tech-filter { margin: -4px 0 12px; }
.tech-filter select { margin: 0; }
.day-title { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 10px; }
.day-title h2 { margin: 0; }
.jobs { list-style: none; margin: 0 0 16px; padding: 0; }
.job { display: flex; gap: 12px; align-items: stretch; background: #fff; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px;
  text-decoration: none; color: var(--text); border-left: 5px solid var(--brand);
  box-shadow: 0 1px 2px rgba(25,42,61,.06), 0 0 0 1px rgba(25,42,61,.04); }
.job.valmis { border-left-color: var(--ok); opacity: .8; }
.job.draft { border-left-color: var(--accent); }
.job.esto { border-left-color: #9aa6b2; background: repeating-linear-gradient(-45deg, #fff, #fff 8px, #f5f7f9 8px, #f5f7f9 16px); }
.job-time { display: flex; flex-direction: column; min-width: 46px; font-size: .9rem; }
.job-time span { color: var(--muted); font-size: .8rem; }
.job-main { flex: 1; display: flex; flex-direction: column; min-width: 0; font-size: .92rem; }
.job-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-main strong { font-size: 1rem; }
.job-status { align-self: flex-start; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: #eaf4ff; color: #0168b8; white-space: nowrap; }
.job.valmis .job-status { background: #e6f6ec; color: var(--ok); }
.job.draft .job-status { background: #fff1e5; color: var(--warn); }
.job.esto .job-status { background: #eef2f6; color: var(--muted); }
.waiting { border-left: 4px solid var(--accent); }
.due-link { display: flex; flex-direction: column; text-decoration: none; color: var(--text); border-left: 4px solid var(--brand); }
.fab { position: fixed; right: 18px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 15; width: 58px; height: 58px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 2rem; line-height: 56px; text-align: center; text-decoration: none;
  box-shadow: 0 6px 16px rgba(254,110,1,.4); }
@media (min-width: 761px) { .fab { bottom: 28px; right: 28px; } }

/* Keikka */
.job-hero { background: #fff; border-radius: var(--radius); padding: 18px 16px; margin-bottom: 12px; border-top: 5px solid var(--brand);
  box-shadow: 0 1px 2px rgba(25,42,61,.06), 0 0 0 1px rgba(25,42,61,.04); }
.job-hero.valmis { border-top-color: var(--ok); }
.job-hero.peruttu { border-top-color: var(--danger); }
.job-hero.esto { border-top-color: #9aa6b2; }
.job-hero h1 { margin: 6px 0; }
.job-hero p { margin: 4px 0 0; }
.job-hero-time { font-size: 1.05rem; }
.job-hero-status { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px; background: #fff; border-radius: var(--radius);
  text-decoration: none; color: var(--text); font-weight: 600; font-size: .85rem; box-shadow: 0 1px 2px rgba(25,42,61,.06), 0 0 0 1px rgba(25,42,61,.04); }
.qa span { font-size: 1.4rem; }
.cta-card { border-top: 4px solid var(--accent); }
.cta-card p { margin: 8px 0 0; }
.note-box { background: #f6f9fc; border-radius: 9px; padding: 10px 12px; margin: 0 0 12px; font-size: .92rem; }
.note-box p { margin: 4px 0 0; }
.note-box.internal { background: #fff8ef; }
.cancel-box summary { cursor: pointer; font-weight: 600; color: var(--danger); }
.cancel-box form { margin-top: 12px; }
.btn-row form { margin: 0; }
.kind-seg { margin-bottom: 14px; }
.kind-seg .seg-opt input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.kind-seg .seg-opt span { padding: 11px 4px; font-size: .9rem; }
#job-form.kind-esto .not-esto, #job-form:not(.kind-esto) .only-esto,
#job-form:not(.kind-huolto) .only-huolto, #job-form:not(.kind-asennus) .only-asennus,
#job-form:not(.kind-kaynti) .only-kaynti { display: none; }
.kind-seg .seg-opt:nth-child(2) input:checked + span { background: var(--navy); border-color: var(--navy); }
:root { --navy: #1f3864; }
.job.kind-asennus { border-left-color: var(--navy); }
.job.kind-asennus.valmis { border-left-color: var(--ok); }
.kind-tag { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 1px 6px; border-radius: 4px; background: var(--navy); color: #fff; vertical-align: 2px; margin-right: 4px; }
.job-hero.kind-asennus { border-top-color: var(--navy); }
.badge.asennus { background: #e7ecf5; color: var(--navy); }
.kind-filter { display: flex; gap: 6px; margin: -6px 0 14px; }
.kind-filter a { padding: 6px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); text-decoration: none;
  color: var(--text); font-size: .85rem; font-weight: 600; }
.kind-filter a.sel { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Raporttilomake */
details.collapsible > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; }
details.collapsible > summary::-webkit-details-marker { display: none; }
details.collapsible > summary h2 { margin: 0; display: flex; justify-content: space-between; }
details.collapsible > summary h2::after { content: "Muokkaa"; font-size: .8rem; color: var(--brand); font-weight: 600; }
details.collapsible[open] > summary h2::after { content: "Sulje"; }
details.collapsible[open] > summary { margin-bottom: 12px; }
.summary-text { font-size: .88rem; color: var(--muted); margin-top: 2px; }
details.collapsible[open] .summary-text { display: none; }
.meas-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.meas-row > label { margin: 0 0 4px; color: var(--text); font-weight: 500; font-size: .92rem; }
.meas-input { display: flex; gap: 6px; align-items: center; }
.meas-input input { margin: 0 !important; flex: 1; }
.meas-input .unit { min-width: 30px; color: var(--muted); font-weight: 600; }
.meas-input .note-toggle { height: 44px; }
.meas-row .cl-note { display: none !important; }
.meas-row.show-note .cl-note { display: block !important; }
.meas-row.show-note .note-toggle { background: #eef6ff; color: var(--brand); border-color: var(--brand); }
.meas dt em { display: block; font-style: normal; font-size: .82rem; }
.facts small { display: block; color: var(--muted); font-size: .8rem; }
.resend { margin-top: 12px; }
.resend summary { cursor: pointer; color: var(--brand); font-weight: 600; margin-bottom: 10px; }

/* Ajanvaraus (julkinen) */
.book-hero { padding: 6px 2px 10px; }
.book-hero h1 { font-size: 1.6rem; margin-bottom: 6px; }
.book-hero p { margin: 4px 0; }
.step { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: .85rem; margin-right: 6px; }
.choice-list { display: grid; gap: 8px; }
.choice { display: flex; flex-direction: column; padding: 14px; border: 2px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); }
.choice.sel { border-color: var(--brand); background: #f2f9ff; }
.day-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 0 -16px 8px; padding-left: 16px; padding-right: 16px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.chip { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; padding: 9px 14px; border: 2px solid var(--line);
  border-radius: 12px; text-decoration: none; color: var(--text); font-weight: 600; scroll-snap-align: start; }
.chip small { color: var(--muted); font-weight: 500; font-size: .72rem; }
.chip.sel { border-color: var(--brand); background: var(--brand); color: #fff; }
.chip.sel small { color: #dbeeff; }
.slot-day { font-weight: 600; margin: 6px 0 8px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.slot { margin: 0; }
.slot input { position: absolute; opacity: 0; }
.slot span { display: block; text-align: center; padding: 12px 0; border: 2px solid var(--line); border-radius: 10px; font-weight: 700;
  color: var(--text); font-size: 1rem; cursor: pointer; }
.slot input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot input:focus-visible + span { box-shadow: 0 0 0 3px rgba(1,145,254,.3); }
.consent { align-items: flex-start; margin: 6px 0 16px; }
.consent input { margin-top: 2px; flex-shrink: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done-card { padding: 30px 20px; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 2rem; line-height: 64px; margin: 0 auto 12px; }
.done-when { font-size: 1.15rem; }

/* Profiili, asentajat, asetukset */
.sig-pad { display: block; width: 100%; height: 160px; border: 2px dashed #b9c6d3; border-radius: 10px; background: #fff; touch-action: none; margin-bottom: 8px; }
.sig-current { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.sig-current img { height: 60px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.user-card summary { display: flex; gap: 12px; align-items: center; cursor: pointer; list-style: none; }
.user-card summary::-webkit-details-marker { display: none; }
.user-card[open] summary { margin-bottom: 12px; }
.user-card.inactive { opacity: .6; }
.settings-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.link-card { display: flex; flex-direction: column; text-decoration: none; color: var(--text); margin-bottom: 0; }
.settings-links + .card { margin-top: 14px; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input { margin: 0 !important; flex: 1; font-size: 14px !important; }
.day-checks { display: flex; gap: 6px; margin-bottom: 14px; }
.day-checks .seg-opt input { position: absolute; opacity: 0; }
.day-checks .seg-opt input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.day-checks .seg-opt span { display: block; text-align: center; padding: 9px 0; border: 1px solid #cfd8e1; border-radius: 8px; font-weight: 600; color: var(--muted); }

/* ===== Versio 3: CRM (myynti) ===== */
:root { --st-uusi: #fe6e01; --st-yhteydessa: #0191fe; --st-kaynti: #7a4dd8; --st-tarjous: #c99700; --st-voitettu: #168746; --st-havitty: #8a96a3; }
.nav-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .72rem; line-height: 18px; text-align: center; }
.tab-icon { position: relative; display: inline-flex; }
.tab-badge { position: absolute; top: -4px; right: -10px; min-width: 17px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .65rem; line-height: 17px; text-align: center; }
.kind-tag.k-kaynti { background: var(--st-kaynti); }
.overdue-text { color: var(--danger); font-weight: 600; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.crm-due { border-left-color: var(--accent); }
.help-box { margin: 10px 0 14px; background: #f6f9fc; border-radius: 9px; padding: 10px 12px; }
.help-box summary { cursor: pointer; font-weight: 600; color: var(--brand); font-size: .92rem; }
.help-box ol { padding-left: 18px; margin: 10px 0; }

/* Myyntinäkymä */
.crm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; background: #fff; border-radius: var(--radius); text-decoration: none; color: var(--text);
  box-shadow: 0 1px 2px rgba(25,42,61,.06), 0 0 0 1px rgba(25,42,61,.04); text-align: center; }
.stat strong { font-size: 1.15rem; line-height: 1.2; white-space: nowrap; }
.stat span { font-size: .72rem; color: var(--muted); }
.stat.hot strong { color: var(--accent); }
.stat.warn strong { color: var(--danger); }
@media (max-width: 380px) { .stat strong { font-size: 1rem; } }
.stage-chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px 4px; -webkit-overflow-scrolling: touch; }
.stage-chips a { flex: 0 0 auto; padding: 7px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: .85rem; font-weight: 600; white-space: nowrap; }
.stage-chips a small { color: var(--muted); font-weight: 500; margin-left: 2px; }
.stage-chips a.sel { background: var(--brand); border-color: var(--brand); color: #fff; }
.stage-chips a.sel small { color: #dbeeff; }
.due-card { border-left: 4px solid var(--danger); }
.pipeline { display: grid; gap: 14px; margin-bottom: 14px; }
@media (min-width: 1000px) { main:has(.pipeline) { max-width: 1240px; } .pipeline { grid-template-columns: repeat(4, 1fr); align-items: start; } }
.pipe-col h2 { display: flex; align-items: center; gap: 8px; font-size: .95rem; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 3px solid var(--line); }
.pipe-col .count { background: #e9eef3; color: var(--muted); border-radius: 99px; padding: 0 8px; font-size: .78rem; }
.pipe-col.stage-uusi h2 { border-color: var(--st-uusi); }
.pipe-col.stage-yhteydessa h2 { border-color: var(--st-yhteydessa); }
.pipe-col.stage-kaynti h2 { border-color: var(--st-kaynti); }
.pipe-col.stage-tarjous h2 { border-color: var(--st-tarjous); }
.pipe-empty { margin: 4px 0 8px; }
.lead-list { margin-bottom: 14px; }
.lead-card { display: block; background: #fff; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; text-decoration: none; color: var(--text);
  border-left: 5px solid var(--line); box-shadow: 0 1px 2px rgba(25,42,61,.06), 0 0 0 1px rgba(25,42,61,.04); }
.lead-card.stage-uusi { border-left-color: var(--st-uusi); }
.lead-card.stage-yhteydessa { border-left-color: var(--st-yhteydessa); }
.lead-card.stage-kaynti { border-left-color: var(--st-kaynti); }
.lead-card.stage-tarjous { border-left-color: var(--st-tarjous); }
.lead-card.stage-voitettu { border-left-color: var(--st-voitettu); }
.lead-card.stage-havitty { border-left-color: var(--st-havitty); opacity: .75; }
.lc-top { display: flex; justify-content: space-between; gap: 8px; }
.lc-value { font-weight: 700; color: var(--ok); white-space: nowrap; }
.lc-meta, .lc-note { font-size: .88rem; color: var(--muted); margin-top: 2px; }
.lc-note { font-style: italic; }
.lc-next { font-size: .85rem; font-weight: 600; margin-top: 4px; }
.lc-next.today { color: var(--warn); }
.lc-next.overdue { color: var(--danger); }
.lc-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; font-size: .75rem; color: var(--muted); }
.lc-foot .src { background: #eef2f6; border-radius: 4px; padding: 1px 6px; color: var(--text); }
.stage-pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .72rem; font-weight: 700; color: #fff; background: var(--st-havitty); }
.stage-pill.s-uusi { background: var(--st-uusi); }
.stage-pill.s-yhteydessa { background: var(--st-yhteydessa); }
.stage-pill.s-kaynti { background: var(--st-kaynti); }
.stage-pill.s-tarjous { background: var(--st-tarjous); }
.stage-pill.s-voitettu { background: var(--st-voitettu); }
.crm-links { justify-content: center; }

/* Liidikortti */
.lead-hero { background: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 12px; border-top: 5px solid var(--st-havitty);
  box-shadow: 0 1px 2px rgba(25,42,61,.06), 0 0 0 1px rgba(25,42,61,.04); }
.lead-hero.stage-uusi { border-top-color: var(--st-uusi); }
.lead-hero.stage-yhteydessa { border-top-color: var(--st-yhteydessa); }
.lead-hero.stage-kaynti { border-top-color: var(--st-kaynti); }
.lead-hero.stage-tarjous { border-top-color: var(--st-tarjous); }
.lead-hero.stage-voitettu { border-top-color: var(--st-voitettu); }
.lead-hero h1 { margin: 8px 0 4px; }
.lead-hero p { margin: 2px 0; }
.lead-value { font-size: 1.15rem; font-weight: 700; color: var(--ok); }
.quick-actions.four { grid-template-columns: repeat(4, 1fr); }
.quick-actions.four .qa { font-size: .78rem; }
.stage-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
.stage-steps form { margin: 0; }
.step-btn { width: 100%; min-height: 44px; padding: 6px 4px; border: 1px solid #cfd8e1; border-radius: 9px; background: #fff; font: inherit; font-size: .8rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.step-btn.current { color: #fff; border-color: transparent; background: var(--st-havitty); }
.step-btn.current.s-uusi { background: var(--st-uusi); }
.step-btn.current.s-yhteydessa { background: var(--st-yhteydessa); }
.step-btn.current.s-kaynti { background: var(--st-kaynti); }
.step-btn.current.s-tarjous { background: var(--st-tarjous); }
.step-btn.current.s-voitettu { background: var(--st-voitettu); }
.lost-box { margin-top: 12px; }
.lost-box summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
.lost-box form { margin-top: 10px; }
.lost-note { margin: 10px 0 0; color: var(--muted); font-weight: 600; }
.next-card { border-left: 4px solid var(--brand); }
.next-card.overdue { border-left-color: var(--danger); background: #fff8f8; }
.next-form input { margin-top: 0 !important; margin-bottom: 8px; }
.next-row { display: flex; gap: 8px; align-items: flex-start; }
.next-row input { flex: 1; }
.next-row .btn { flex: 0 0 auto; }
.entry-kinds { margin-bottom: 8px; }
.entry-kinds .seg-opt input { position: absolute; opacity: 0; }
.entry-kinds .seg-opt span { font-size: .75rem; padding: 8px 2px; }
.entry-kinds .seg-opt input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.entry-form textarea { margin: 0 0 8px !important; }
.timeline { list-style: none; margin: 16px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 10px; }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; }
.timeline li.tl-tila::before { background: var(--st-kaynti); }
.timeline li.tl-jarjestelma::before { background: var(--st-havitty); }
.timeline li.tl-puhelu::before { background: var(--ok); }
.timeline li.tl-sahkoposti::before { background: var(--st-tarjous); }
.timeline li.tl-kaynti::before { background: var(--accent); }
.tl-head { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.tl-head form { margin-left: auto; }
.tl-del { border: 0; background: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; line-height: 1; padding: 0 4px; }
.timeline p { margin: 2px 0 0; font-size: .92rem; }
.timeline li.tl-tila p, .timeline li.tl-jarjestelma p { color: var(--muted); font-size: .85rem; }
.auto-upload { margin-top: 4px; }

/* ===== Versio 4: keikat (tiketit) ja ikkunat ===== */
.ticket-no { display: inline-block; font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: .78rem; letter-spacing: .02em;
  background: #1f3864; color: #fff; border-radius: 5px; padding: 1px 6px; vertical-align: 1px; }
.ticket-no.big { font-size: 1rem; padding: 2px 8px; }
.ticket-status { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: #fff1e5; color: var(--warn); white-space: nowrap; }
.ticket-status.s-aikataulutettu { background: #e5f2ff; color: #0168b8; }
.ticket-status.s-valmis { background: #e6f6ec; color: var(--ok); }
.tc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.tabs-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; background: #e9eef3; padding: 4px; border-radius: 12px; }
.tabs-2 a { text-align: center; padding: 9px 4px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: .92rem; }
.tabs-2 a.sel { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(25,42,61,.12); }
.tabs-2 small { font-weight: 600; color: var(--muted); }
.ticket-card { display: flex; flex-direction: column; gap: 2px; background: #fff; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px;
  text-decoration: none; color: var(--text); border-left: 5px solid var(--accent); box-shadow: 0 1px 2px rgba(25,42,61,.06), 0 0 0 1px rgba(25,42,61,.04); }
.ticket-card.st-aikataulutettu { border-left-color: var(--brand); }
.ticket-card.st-valmis { border-left-color: var(--ok); }
.ticket-card.compact { box-shadow: none; background: #f6f9fc; }
.ticket-card .muted { font-size: .88rem; }
.tc-foot { display: flex; justify-content: space-between; gap: 8px; font-size: .82rem; color: var(--muted); margin-top: 4px; }
.tc-foot b { color: var(--ok); white-space: nowrap; }
.ticket-hero { background: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 12px; border-top: 5px solid var(--accent);
  box-shadow: 0 1px 2px rgba(25,42,61,.06), 0 0 0 1px rgba(25,42,61,.04); }
.ticket-hero.st-aikataulutettu { border-top-color: var(--brand); }
.ticket-hero.st-valmis { border-top-color: var(--ok); }
.ticket-hero h1 { margin: 8px 0 4px; }
.ticket-hero p { margin: 2px 0; }
.ticket-steps { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 0 0 12px; padding: 0; counter-reset: s; }
.ticket-steps li { position: relative; text-align: center; font-size: .75rem; font-weight: 600; color: var(--muted); padding-top: 26px; }
.ticket-steps li::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 22px; height: 22px; border-radius: 50%; background: #dfe6ec; color: #fff; line-height: 22px; font-size: .75rem; z-index: 1; }
.ticket-steps li::after { content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 3px; background: #dfe6ec; }
.ticket-steps li:first-child::after { display: none; }
.ticket-steps li.done { color: var(--text); }
.ticket-steps li.done::before { background: var(--ok); content: "✓"; }
.ticket-steps li.done::after { background: var(--ok); }
.ticket-info { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); border-left: 4px solid #1f3864; }
.ticket-info p { margin: 4px 0 0; font-size: .92rem; }
.report-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.report-row a:first-child { display: flex; flex-direction: column; text-decoration: none; color: var(--text); }
.job-main strong .ticket-no { font-size: .7rem; }

/* Alapalkki: viisi kohtaa */
@media (max-width: 760px) { .tabbar a { font-size: .66rem; } }

/* Ikkuna (bottom sheet mobiilissa) */
dialog.sheet { border: 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 16px; width: min(520px, 100%);
  max-height: 92vh; overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,.25); color: var(--text); }
dialog.sheet::backdrop { background: rgba(10, 20, 35, .45); }
@media (max-width: 600px) { dialog.sheet { margin: auto 0 0; max-width: 100%; border-radius: 16px 16px 0 0; } }
dialog.sheet h2 { margin-top: 0; }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.thumb-row { display: flex; gap: 6px; margin-top: 8px; }
.thumb-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #eef2f6; }
.thumb-more { width: 64px; height: 64px; border-radius: 8px; background: #eef2f6; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); }


/* Kalenterin näkymät: kuukausi, viikko, päivä */
.view-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: #e9eef3; padding: 4px; border-radius: 12px; margin-bottom: 12px; }
.view-switch a { text-align: center; padding: 8px 0; border-radius: 9px; font-weight: 600; font-size: .9rem; color: var(--muted); text-decoration: none; }
.view-switch a.sel { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(25,42,61,.12); }
main:has(.wk), main:has(.month) { max-width: 1180px; }

.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--line); gap: 1px; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line); margin-bottom: 8px; touch-action: pan-y; }
.m-head { background: #f7f9fb; text-align: center; font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--muted); padding: 6px 0; }
.m-day { background: #fff; min-height: 64px; padding: 4px; display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--text); min-width: 0; }
.m-day.other { background: #fafbfc; color: #aab4be; }
.m-day.sel { box-shadow: inset 0 0 0 2px var(--brand); }
.m-num { font-size: .85rem; font-weight: 700; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.m-day.today .m-num { background: var(--brand); color: #fff; }
.m-dots { display: flex; flex-wrap: wrap; gap: 3px; padding-left: 3px; }
.m-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.m-items { display: none; }
.m-dots .kind-asennus, .m-item.kind-asennus { background: var(--navy); }
.m-dots .kind-kaynti, .m-item.kind-kaynti { background: var(--st-kaynti); }
.m-dots .valmis, .m-item.valmis { background: var(--ok); }
.m-dots .esto, .m-item.esto { background: #9aa6b2; }
.m-dots .google, .m-item.google { background: #8fa3b8; }
@media (min-width: 761px) {
  .m-day { min-height: 104px; }
  .m-dots { display: none; }
  .m-items { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .m-item { display: block; background: var(--brand); color: #fff; border-radius: 4px; padding: 1px 5px; font-size: .72rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-more { font-size: .72rem; color: var(--muted); padding-left: 4px; }
}

.wk { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; margin-bottom: 8px; touch-action: pan-y; }
.wk-row { display: grid; grid-template-columns: 30px repeat(7, minmax(0, 1fr)); }
.wk-heads { border-bottom: 1px solid var(--line); }
.wk-head { display: flex; flex-direction: column; align-items: center; padding: 5px 0; text-decoration: none; color: var(--text); }
.wk-head span { font-size: .68rem; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.wk-head b { font-size: 1rem; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.wk-head.today b { background: var(--brand); color: #fff; }
.wk-allday { border-bottom: 1px solid var(--line); background: #fafbfc; }
.wk-allday-cell { padding: 2px; display: flex; flex-direction: column; gap: 2px; min-width: 0; border-left: 1px solid var(--line); }
.wk-body { --hour: 46px; height: calc(var(--hours) * var(--hour)); }
.wk-axis { position: relative; }
.wk-body .wk-axis span { display: block; height: var(--hour); font-size: .66rem; color: var(--muted); text-align: right; padding-right: 4px; transform: translateY(-6px); }
.wk-body .wk-axis span:first-child { transform: none; }
.wk-col { position: relative; border-left: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hour) - 1px), #eef2f6 calc(var(--hour) - 1px), #eef2f6 var(--hour)); }
.wk-col.today { background-color: #f5faff; }
.wk-ev { position: absolute; box-sizing: border-box; padding: 2px 3px; border-radius: 5px; font-size: .66rem; line-height: 1.2; overflow: hidden;
  background: var(--brand); color: #fff; text-decoration: none; border: 1px solid #fff; word-break: break-word; }
.wk-ev b { display: block; font-weight: 700; }
.wk-ev.kind-asennus { background: var(--navy); }
.wk-ev.kind-kaynti { background: var(--st-kaynti); }
.wk-ev.valmis { background: var(--ok); }
.wk-ev.draft { background: var(--accent); }
.wk-ev.esto { background: repeating-linear-gradient(-45deg, #b9c3cd, #b9c3cd 6px, #a7b2bd 6px, #a7b2bd 12px); color: #1d2b38; }
.wk-ev.google { background: #e8edf2; color: #3c4b59; border-color: #c7d1db; }
@media (min-width: 761px) { .wk-row { grid-template-columns: 44px repeat(7, minmax(0, 1fr)); } .wk-body { --hour: 52px; } .wk-ev { font-size: .76rem; padding: 3px 5px; } }

.chip { display: block; font-size: .66rem; padding: 1px 4px; border-radius: 4px; background: var(--brand); color: #fff; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.esto { background: #9aa6b2; }
.chip.google { background: #e8edf2; color: #3c4b59; }
.legend { color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin: 4px 0 14px; }
.legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--brand); margin-right: -8px; vertical-align: -1px; }
.legend .lg.kind-asennus { background: var(--navy); }
.legend .lg.kind-kaynti { background: var(--st-kaynti); }
.legend .lg.google { background: #e8edf2; border: 1px solid #c7d1db; }
.legend .lg.esto { background: #a7b2bd; }
.job.google { border-left-color: #c7d1db; background: #f7f9fb; }
.job.google .job-status { background: #eef2f6; color: var(--muted); }
.ticket-item .ticket-card:has(+ .ticket-finish) { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.ticket-finish { margin: 0 0 10px; }
.ticket-finish .btn { width: 100%; border-top-left-radius: 0; border-top-right-radius: 0; border-top: 1px solid var(--line); }
.code-input { font-size: 1.6rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.device-list { list-style: none; padding: 0; margin: 0 0 12px; }
.device-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.device-list li:last-child { border-bottom: 0; }
.device-list .this { color: var(--ok); font-weight: 700; font-size: .78rem; }
