/* Žalia Kopa cleaner app. Mobile first, large type, high contrast, calm motion.
   Every touch target is at least 48px; nothing depends on hover. */

:root {
  --bg: #f4efe3; --paper: #ffffff; --ink: #13241a; --soft: #56675c; --line: #ddd5c2;
  --green: #1f5e3b; --green2: #2b7a4b; --green-soft: #e3f1e6; --orange: #c4570f; --orange-soft: #fdeee2;
  --red: #b3261e; --red-soft: #fbe9e7; --shadow: 0 1px 2px rgba(19,36,26,.08), 0 6px 18px rgba(19,36,26,.07);
  --r: 20px; --ease: cubic-bezier(.2,.8,.2,1);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101a14; --paper: #1a271f; --ink: #eef4ef; --soft: #a7b7ab; --line: #2e4135;
    --green: #2b7a4b; --green2: #5fb47e; --green-soft: #1d3a29; --orange: #f08a43; --orange-soft: #3a2616;
    --red: #ff8a80; --red-soft: #3a1d1a; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
  }
}

* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 18px/1.5 "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}
body.has-tabs { padding-bottom: calc(76px + var(--safe-b)); }
a { color: inherit; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2 { margin: 0; line-height: 1.2; }
.muted { color: var(--soft); } .small { font-size: 15px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 10px; }

/* ---- page transitions (cross-document View Transitions, with a CSS fallback) ---- */
@view-transition { navigation: auto; }
.daypane { view-transition-name: daypane; }
.tabs { view-transition-name: tabs; }
.appbar { view-transition-name: appbar; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(daypane) { animation: .18s var(--ease) both fade-out; }
  ::view-transition-new(daypane) { animation: .26s var(--ease) both fade-in; }
  html:active-view-transition-type(next)::view-transition-old(daypane) { animation: .22s var(--ease) both out-left; }
  html:active-view-transition-type(next)::view-transition-new(daypane) { animation: .28s var(--ease) both in-right; }
  html:active-view-transition-type(prev)::view-transition-old(daypane) { animation: .22s var(--ease) both out-right; }
  html:active-view-transition-type(prev)::view-transition-new(daypane) { animation: .28s var(--ease) both in-left; }
  .enter-next .daypane { animation: .28s var(--ease) both in-right; }
  .enter-prev .daypane { animation: .28s var(--ease) both in-left; }
  .jc, .summary-card { animation: .32s var(--ease) both rise; }
  .jc:nth-of-type(2) { animation-delay: .03s; } .jc:nth-of-type(3) { animation-delay: .06s; } .jc:nth-of-type(n+4) { animation-delay: .09s; }
}
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes out-left { to { opacity: 0; transform: translateX(-12%); } }
@keyframes out-right { to { opacity: 0; transform: translateX(12%); } }
@keyframes in-right { from { opacity: 0; transform: translateX(14%); } }
@keyframes in-left { from { opacity: 0; transform: translateX(-14%); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---- app bar with sticky week strip ---- */
.appbar {
  position: sticky; top: 0; z-index: 20; background: var(--green); color: #fff;
  padding: calc(10px + var(--safe-t)) 0 10px; box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.appbar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px; max-width: 640px; margin: 0 auto; }
.appbar.simple { padding-bottom: 12px; }
.hello { font-size: 17px; opacity: .92; }
.page-title { font-size: 26px; padding: 6px 0; }
.appbar .muted { color: rgba(255,255,255,.8); }
.month-row { margin-top: 4px; }
.month { font-size: 24px; font-weight: 700; letter-spacing: .2px; }
.pill-today {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 99px;
  background: #fff; color: var(--green); font-weight: 700; text-decoration: none; font-size: 17px;
  transition: transform .15s var(--ease), opacity .2s;
}
.pill-today.is-today { background: rgba(255,255,255,.16); color: #fff; }
.pill-today:active, .iconbtn:active, .roundbtn:active { transform: scale(.95); }
.iconbtn {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border-radius: 99px; background: rgba(255,255,255,.16); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
}
.iconbtn input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.iconbtn svg { width: 20px; height: 20px; }

.wstrip {
  display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
  padding: 12px 16px 2px; margin: 0 auto; max-width: 640px; scrollbar-width: none; overscroll-behavior-x: contain;
}
.wstrip::-webkit-scrollbar { display: none; }
.wday {
  flex: 0 0 calc((100% - 6 * 6px) / 7); min-width: 46px; scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 0 7px;
  border-radius: 16px; text-decoration: none; color: #fff; background: rgba(255,255,255,.08);
  transition: background .2s, transform .15s var(--ease);
}
.wday .wd { font-size: 13px; opacity: .85; }
.wday b { font-size: 20px; line-height: 1.1; }
.wday .cnt {
  font-style: normal; font-size: 12px; font-weight: 700; min-width: 22px; height: 20px; line-height: 20px;
  text-align: center; border-radius: 99px; background: #fff; color: var(--green); padding: 0 5px;
}
.wday .cnt.zero { background: transparent; }
.wday .cnt.zero::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.35); vertical-align: middle; }
.wday.plan .cnt:not(.zero) { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.8); }
.wday.we { background: rgba(0,0,0,.08); }
.wday.today .wd { font-weight: 700; opacity: 1; }
.wday.today { box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.wday.on { background: #fff; color: var(--green); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.wday.on .cnt { background: var(--green); color: #fff; }
.wday.on .cnt.zero::before { background: var(--line); }
.wday:active { transform: scale(.95); }

/* ---- day pane ---- */
main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 16px 16px 24px; }
main.wide { max-width: 1100px; }
.dayhead { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; }
.daytitle { flex: 1; text-align: center; }
.daytitle h1 { font-size: 22px; }
.daytitle .rel { font-size: 15px; font-weight: 700; color: var(--green2); text-transform: uppercase; letter-spacing: .6px; }
.roundbtn {
  width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--paper); border: 2px solid var(--line); color: var(--ink); text-decoration: none; flex: none;
  transition: transform .15s var(--ease);
}
.roundbtn.off { visibility: hidden; }

.summary-card {
  background: var(--paper); border-radius: var(--r); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.sum-top { display: flex; align-items: center; gap: 18px; }
.sum-n { font-size: 46px; font-weight: 700; line-height: 1; color: var(--green2); }
.sum-l { font-size: 16px; color: var(--soft); }
.sum-progress { flex: 1; }
.sum-note { margin: 0; color: var(--soft); font-size: 16px; }
.bar { height: 12px; border-radius: 99px; background: var(--green-soft); overflow: hidden; margin-bottom: 6px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--green2); transition: width .5s var(--ease); }
.sum-next {
  display: grid; gap: 2px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--green-soft);
  text-decoration: none; transition: transform .15s var(--ease);
}
.sum-next:active { transform: scale(.98); }
.sum-next-l { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--green2); }
.sum-next b { font-size: 19px; }
.sum-next .addr { color: var(--soft); font-size: 16px; }
.empty { display: flex; align-items: center; gap: 14px; }
.empty svg { width: 48px; height: 48px; color: var(--green2); stroke-width: 2.2; }
.empty b { display: block; font-size: 20px; } .empty span { color: var(--soft); }
.big-empty { justify-content: center; margin-bottom: 12px; } .big-empty svg { width: 72px; height: 72px; }

/* ---- job cards ---- */
.jc {
  display: block; position: relative; background: var(--paper); border-radius: var(--r); padding: 16px 18px 14px;
  margin-bottom: 14px; text-decoration: none; box-shadow: var(--shadow); border: 2px solid transparent;
  transition: transform .15s var(--ease), box-shadow .2s;
}
.jc:active { transform: scale(.985); box-shadow: none; }
.jc.unseen { border-color: var(--orange); }
.jc.hot:not(.unseen) { border-color: var(--orange-soft); }
.jc.st-baigta { background: var(--green-soft); box-shadow: none; }
.jc.st-problema { border-color: var(--red); }
.jc.plan { background: transparent; border: 2px dashed var(--line); box-shadow: none; }
.jc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.jc-time { font-size: 32px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.jc-time small { font-size: 20px; color: var(--soft); font-weight: 400; }
.jc-name { font-size: 22px; font-weight: 700; line-height: 1.2; margin-top: 8px; }
.jc-addr, .jc-guests { display: flex; gap: 8px; align-items: flex-start; color: var(--soft); font-size: 17px; margin-top: 6px; }
.jc-guests { color: var(--ink); }
.jc-addr svg, .jc-guests svg { width: 20px; height: 20px; margin-top: 2px; color: var(--soft); }
.jc-guests.muted { color: var(--soft); }
.pill { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 99px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.p-naujas, .p-priimta { background: var(--orange-soft); color: var(--orange); }
.p-vyksta { background: #fff3c4; color: #7a5a00; }
.p-baigta { background: var(--green2); color: #fff; }
.p-problema { background: var(--red); color: #fff; }
.p-plan { background: transparent; color: var(--soft); box-shadow: inset 0 0 0 2px var(--line); }
@media (prefers-color-scheme: dark) { .p-vyksta { background: #3d3410; color: #ffd75e; } }
.flag { display: inline-block; margin: 10px 8px 0 0; padding: 5px 12px; border-radius: 99px; background: var(--orange); color: #fff; font-weight: 700; font-size: 15px; }
.flag.warm { background: var(--orange-soft); color: var(--orange); }

.stepper { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0; margin: 14px 0 0; counter-reset: s; }
.stepper li {
  position: relative; text-align: center; font-size: 14px; font-weight: 700; color: var(--soft);
  padding-top: 12px; border-top: 5px solid var(--line); border-radius: 2px;
}
.stepper li.done { border-top-color: var(--green2); color: var(--green2); }
.stepper li.cur { color: var(--ink); }
.stepper li.cur:not(.done) { border-top-color: var(--orange); }
.stepper li.bad { border-top-color: var(--red); color: var(--red); }
.big-stepper { margin: 0 0 16px; } .big-stepper li { font-size: 16px; border-top-width: 7px; }

/* ---- team list ---- */
.team { margin-top: 26px; color: var(--soft); font-size: 16px; }
.team summary { cursor: pointer; padding: 12px 4px; min-height: 48px; }
.team ul { margin: 4px 0 0; padding-left: 18px; }
.team li { margin: 6px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.team .t { font-variant-numeric: tabular-nums; }
.team-reg { font-weight: 700; margin-top: 8px; }
.take { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 2px solid var(--green2); color: var(--green2); font-weight: 700; text-decoration: none; }

/* ---- bottom tab bar ---- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--paper); border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
  box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 68px;
  font-size: 15px; font-weight: 700; color: var(--soft); text-decoration: none; transition: color .2s;
}
.tabs a.on { color: var(--green2); box-shadow: inset 0 3px 0 var(--green2); }
.tabs a:active svg { transform: scale(.9); }
.tabs svg { width: 26px; height: 26px; transition: transform .15s var(--ease); }

/* ---- detail pages (job, problem, take-over, login) ---- */
.top { background: var(--green); color: #fff; padding: calc(12px + var(--safe-t)) 18px 18px; }
.top .hi { font-size: 26px; font-weight: 700; line-height: 1.15; }
.top .date { font-size: 18px; opacity: .92; }
.top-addr { font-size: 16px; opacity: .9; margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; color: #fff; text-decoration: none; font-size: 18px; font-weight: 700; }
.back svg { width: 22px; height: 22px; }
.card { background: var(--paper); border-radius: var(--r); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card.stay { padding: 6px 18px; } .card.stay.hot { box-shadow: inset 0 0 0 2px var(--orange), var(--shadow); }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
.row:last-child { border: 0; } .row span { color: var(--soft); } .row b { text-align: right; }
.row.tip b { color: var(--orange); }
.big-guests { font-size: 21px; }
.lbl { font-size: 15px; color: var(--soft); margin: 18px 4px 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.big {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 68px; border-radius: 18px;
  font: inherit; font-size: 22px; font-weight: 700; background: var(--green); color: #fff; margin-top: 12px; border: 0;
  cursor: pointer; text-decoration: none; text-align: center; padding: 10px; transition: transform .15s var(--ease), filter .2s;
}
.big:active { transform: scale(.98); filter: brightness(.95); }
.big.sec { background: var(--paper); color: var(--red); box-shadow: inset 0 0 0 2px var(--red); min-height: 60px; font-size: 20px; }
.big.light { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); min-height: 60px; font-size: 20px; }
.code { font-size: 30px; font-weight: 700; text-align: center; padding: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
details.access summary { list-style: none; cursor: pointer; } details.access summary::-webkit-details-marker { display: none; }
.check { display: flex; align-items: center; gap: 14px; min-height: 60px; font-size: 20px; cursor: pointer; border-bottom: 1px solid var(--line); }
.check:last-child { border: 0; } .check input { width: 32px; height: 32px; accent-color: var(--green2); flex: none; }
.photo { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; border: 2px dashed var(--green2); border-radius: 18px; font-size: 20px; font-weight: 700; color: var(--green2); cursor: pointer; margin-top: 12px; position: relative; }
.photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; } .thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; }
.choice { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 2px solid var(--line); border-radius: 18px; padding: 18px; font-size: 21px; font-weight: 700; margin-bottom: 12px; cursor: pointer; }
.choice input { width: 28px; height: 28px; accent-color: var(--red); flex: none; }
.choice:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
textarea, input[type=password] { width: 100%; font: inherit; font-size: 19px; border-radius: 14px; border: 2px solid var(--line); padding: 12px; background: var(--paper); color: var(--ink); }
textarea { min-height: 90px; }
.okay { text-align: center; padding: 40px 10px; } .okay svg { width: 140px; height: 140px; } .okay h2 { font-size: 30px; margin: 14px 0 6px; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.keys button { background: var(--paper); border: 0; border-radius: 18px; min-height: 72px; font: inherit; font-size: 30px; font-weight: 700; color: var(--ink); cursor: pointer; box-shadow: var(--shadow); transition: transform .1s; }
.keys button:active { transform: scale(.95); background: var(--green-soft); }
.dots { display: flex; justify-content: center; gap: 16px; margin: 24px 0 6px; }
.dots i { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--green2); transition: background .15s; } .dots i.on { background: var(--green2); }
.err { background: var(--red-soft); color: var(--red); border-radius: 14px; padding: 12px 16px; font-weight: 700; margin-top: 14px; text-align: center; }
.banner { background: var(--orange); color: #fff; border-radius: 18px; padding: 16px; margin-bottom: 14px; font-size: 19px; }
.banner.ok { background: var(--green2); }
.banner button { margin-top: 10px; width: 100%; min-height: 56px; border-radius: 14px; border: 0; font: inherit; font-weight: 700; font-size: 20px; background: #fff; color: var(--orange); cursor: pointer; }
.ok-line { color: var(--green2); font-weight: 700; text-align: center; margin: 8px 0; }
.hint { color: var(--soft); font-size: 16px; margin: 12px 4px; }
.take-card .time { font-size: 22px; font-weight: 700; }
.take-card .name { font-size: 22px; font-weight: 700; } .take-card .addr { color: var(--soft); }

/* ---- profile ---- */
.profile-card { display: flex; align-items: center; gap: 16px; }
.avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--green2); color: #fff; font-size: 28px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pname { font-size: 24px; font-weight: 700; }
.push-state { margin: 0 0 4px; font-size: 19px; font-weight: 700; }
.howto p { margin: 6px 0; }
.kbd { display: inline-block; padding: 0 8px; border-radius: 8px; background: var(--bg); font-weight: 700; }
