/* Funduk Time · Консультації — один файл стилів для обох кабінетів */
:root {
  --pine: #204534;
  --pine-2: #2d5a45;
  --ink: #142c22;
  --leaf: #66864c;
  --lime: #d5e889;
  --nut: #a8743f;
  --paper: #f7f7f0;
  --card: #ffffff;
  --soft: #edf2e9;
  --line: #d9e1d5;
  --muted: #617369;
  --ok: #2f7d4a;
  --ok-bg: #e3f1e5;
  --warn: #9a6400;
  --warn-bg: #fbf0d6;
  --bad: #b23a2e;
  --bad-bg: #f8e1dd;
  --info: #2a5f8f;
  --info-bg: #e2edf7;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 44, 34, .06), 0 4px 14px rgba(20, 44, 34, .05);
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--pine); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1; }
h2 { font-size: 22px; line-height: 1.2; }
h3 { font-size: 18px; line-height: 1.25; }
h4 { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 800; color: var(--leaf); }
.hidden { display: none !important; }

/* ---------- верхня панель ---------- */
.top { position: sticky; top: 0; z-index: 50; height: 60px; display: flex; align-items: center; gap: 14px;
  background: var(--pine); color: #eaf1e8; padding: 0 20px; }
.brand { font: 700 23px var(--serif); letter-spacing: -.04em; color: #fff; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--lime); }
.brand small { font: 600 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #bcd0c0; margin-left: 8px; }
/* знак Corylus — такий самий, як у Corylus Lite (diary/corylus.css) */
.brand:has(.clogo) { display: inline-flex; align-items: center; gap: 10px; font-family: 'Unbounded', 'Manrope', system-ui, sans-serif; font-weight: 600; font-size: 19px; letter-spacing: -.03em; }
.brand .bw { color: #fff; }
.brand .bw span { color: var(--lime); font-weight: 400; }
.brand:has(.clogo) small { margin-left: 0; font-family: 'Manrope', system-ui, sans-serif; letter-spacing: .12em; opacity: .75; color: #eaf1e8; }
.clogo { width: 40px; height: 40px; flex: none; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .45)); margin: -4px 0; }
.login .hero .brand .clogo { width: 56px; height: 56px; margin: -6px 0; }
.top .spacer { flex: 1; }
.top .who { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.who .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--lime); color: var(--pine);
  display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.who .role { color: #bcd0c0; font-size: 11px; display: block; }
.iconbtn { position: relative; background: transparent; border: 1px solid rgba(255,255,255,.25); color: #fff;
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.iconbtn:hover { background: rgba(255,255,255,.1); }
.iconbtn .dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--lime); color: var(--pine); font: 800 11px/18px var(--sans); }
.menu-toggle { display: none; }

.demo-strip { background: #e7efdf; color: #3e5b43; padding: 7px 20px; font-size: 12.5px; text-align: center; }
.demo-strip button { background: none; border: 0; color: var(--pine); text-decoration: underline; font-weight: 700; padding: 0 4px; }

/* ---------- каркас ---------- */
.layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 60px); }
.side { border-right: 1px solid var(--line); background: #fbfbf6; padding: 18px 12px; position: sticky; top: 60px;
  height: calc(100vh - 60px); overflow-y: auto; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--ink);
  text-decoration: none; font-weight: 600; font-size: 14px; }
.nav a:hover { background: var(--soft); }
.nav a.on { background: var(--pine); color: #fff; }
.nav a .ico { width: 20px; text-align: center; opacity: .85; }
.nav a .count { margin-left: auto; background: var(--lime); color: var(--pine); border-radius: 10px; padding: 0 7px;
  font-size: 11px; font-weight: 800; line-height: 18px; }
.nav a.on .count { background: #fff; }
.nav .sep { height: 1px; background: var(--line); margin: 10px 6px; }
.nav .group { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 800; padding: 8px 12px 4px; }
.side-foot { margin-top: 18px; padding: 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.side-foot button { display: block; background: none; border: 0; padding: 4px 0; color: var(--pine); font-weight: 600; font-size: 12.5px; text-align: left; }

.main { padding: 26px 28px 70px; min-width: 0; max-width: 1380px; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.pagehead p { max-width: 720px; margin: 6px 0 0; color: var(--muted); }
.pagehead .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }

/* ---------- кнопки, поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line);
  padding: 8px 14px; min-height: 38px; border-radius: 9px; font-weight: 700; font-size: 13.5px; background: #fff;
  color: var(--pine); text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(.95); }
.btn.primary { background: var(--pine); border-color: var(--pine); color: #fff; }
.btn.lime { background: var(--lime); border-color: #b9cf6a; color: var(--pine); }
.btn.danger { color: var(--bad); border-color: #e9c2bc; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { min-height: 30px; padding: 4px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--pine); font-weight: 700; text-decoration: underline;
  text-underline-offset: 3px; font-size: inherit; }

label.f { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink); }
label.f .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
label.f input, label.f select, label.f textarea { font-weight: 400; }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=search], input[type=email], select, textarea {
  width: 100%; border: 1px solid #cfd9cb; border-radius: 8px; padding: 8px 10px; background: #fff; font-size: 14px; min-height: 38px; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--lime); border-color: var(--leaf); }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.formgrid .full { grid-column: 1 / -1; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; font-weight: 400; }
.checks label { display: flex; gap: 6px; align-items: center; font-size: 13.5px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters select, .filters input { width: auto; min-width: 150px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--ink); }
.chip.on { background: var(--pine); color: #fff; border-color: var(--pine); }
.chip .n { opacity: .7; margin-left: 4px; }

/* ---------- картки, сітки ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card.flat { box-shadow: none; }
.card.soft { background: var(--soft); box-shadow: none; }
.card > .head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card > .head .eyebrow { display: block; margin-bottom: 2px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.split > *, .grid > *, .stack > * { min-width: 0; }
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }

.kpi { padding: 14px 16px; }
.kpi .v { font: 400 30px/1.1 var(--serif); color: var(--pine); }
.kpi .l { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.kpi.warn .v { color: var(--warn); }
.kpi.bad .v { color: var(--bad); }

.list { display: grid; gap: 8px; }
.item { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; background: #fff;
  color: var(--ink); text-decoration: none; text-align: left; width: 100%; }
a.item:hover, button.item:hover { border-color: var(--leaf); background: #fcfdf9; }
.item .meta { font-size: 12px; color: var(--muted); }
.item .t { font-weight: 700; margin: 2px 0; }
.item .row { gap: 6px; }
.item.on { border-color: var(--pine); box-shadow: inset 3px 0 0 var(--pine); }
.empty { padding: 18px; text-align: center; color: var(--muted); font-size: 13.5px; border: 1px dashed var(--line); border-radius: 10px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700;
  background: var(--soft); color: var(--pine); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.lime { background: var(--lime); color: var(--pine); }
.badge.grey { background: #eceeea; color: #5b625d; }
.cat { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: thin; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 14px; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--pine); border-bottom-color: var(--pine); }
.tabs a .n { font-size: 11px; background: var(--soft); border-radius: 9px; padding: 1px 6px; margin-left: 4px; }

table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800;
  padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fafbf7; }
table.t td { padding: 9px 10px; border-bottom: 1px solid #eef1ec; vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

dl.kv { display: grid; grid-template-columns: minmax(120px, 42%) 1fr; gap: 6px 12px; margin: 0; font-size: 13.5px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 600; }

.banner { border-radius: 10px; padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-start; margin-bottom: 14px; font-size: 14px; }
.banner.info { background: var(--info-bg); color: #1d4a72; }
.banner.warn { background: var(--warn-bg); color: #6d4700; }
.banner.ok { background: var(--ok-bg); color: #1f5a33; }
.banner.bad { background: var(--bad-bg); color: #84291f; }
.banner .grow { flex: 1 1 200px; }

/* ---------- стрічки подій / листування ---------- */
.thread { display: grid; gap: 10px; }
.msg { border-radius: 12px; padding: 10px 13px; max-width: 86%; background: #fff; border: 1px solid var(--line); }
.msg.me { margin-left: auto; background: #eef5e4; border-color: #d4e3c3; }
.msg.sys { max-width: 100%; background: transparent; border: 0; padding: 2px 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.msg .by { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.msg .txt { white-space: pre-wrap; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.thumbs img { width: 84px; height: 64px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); cursor: zoom-in; }
.file-pill { display: inline-flex; gap: 6px; align-items: center; background: var(--soft); border-radius: 7px; padding: 4px 8px; font-size: 12px; }

.timeline { position: relative; display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding-bottom: 14px; position: relative; }
.tl::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl .pt { width: 22px; height: 22px; border-radius: 50%; background: var(--soft); border: 2px solid var(--line); display: grid; place-items: center; font-size: 11px; }
.tl.done .pt { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.tl.now .pt { background: var(--lime); border-color: var(--leaf); }

/* Кроки статусу рекомендації */
.steps { display: flex; gap: 0; margin: 4px 0 16px; overflow-x: auto; }
.steps .s { flex: 1; min-width: 90px; text-align: center; font-size: 12px; color: var(--muted); position: relative; padding-top: 22px; font-weight: 600; }
.steps .s::before { content: ""; position: absolute; top: 6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--line); z-index: 1; }
.steps .s::after { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.steps .s:first-child::after { display: none; }
.steps .s.done { color: var(--ok); }
.steps .s.done::before, .steps .s.done::after { background: var(--ok); }
.steps .s.cur { color: var(--pine); font-weight: 800; }
.steps .s.cur::before { background: var(--lime); box-shadow: 0 0 0 3px var(--pine); }

/* ---------- програма сезону ---------- */
.prog { display: grid; grid-template-columns: 110px repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.prog > div { border-bottom: 1px solid #eef1ec; border-right: 1px solid #eef1ec; padding: 8px; min-height: 54px; }
.prog .ph { background: #fafbf7; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); min-height: 0; }
.prog .m { font-weight: 700; font-size: 13px; background: #fafbf7; }
.prog .m small { display: block; color: var(--muted); font-weight: 400; }
.prog .m.cur { background: var(--lime); }
.pi { display: block; width: 100%; text-align: left; border: 1px solid var(--line); border-left: 4px solid var(--leaf); border-radius: 7px; padding: 5px 7px;
  font-size: 12.5px; background: #fff; margin-bottom: 5px; color: var(--ink); }
.pi:hover { background: #fafcf6; }
.pi.done { opacity: .65; }
.pi.done .tt { text-decoration: line-through; }
.pi .q { display: block; font-size: 11px; color: var(--muted); }

/* ---------- календар ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.cal .dh { background: #fafbf7; text-align: center; padding: 6px; font-size: 11.5px; font-weight: 800; color: var(--muted); }
.cal .d { min-height: 96px; border-top: 1px solid #eef1ec; border-left: 1px solid #eef1ec; padding: 5px; font-size: 12px; cursor: pointer; background: #fff; text-align: left; }
.cal .d:nth-child(7n+1) { border-left: 0; }
.cal .d.out { background: #fafaf6; color: #a8b0aa; }
.cal .d.today .num { background: var(--pine); color: #fff; border-radius: 50%; }
.cal .d.sel { outline: 2px solid var(--leaf); outline-offset: -2px; }
.cal .num { display: inline-grid; place-items: center; width: 22px; height: 22px; font-weight: 700; }
.cal .ev { display: block; border-radius: 4px; padding: 1px 4px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.ev.program { background: #eef5e0; color: #46622a; }
.ev.rec { background: var(--warn-bg); color: var(--warn); }
.ev.journal { background: var(--info-bg); color: var(--info); }
.ev.inspection { background: #efe6f6; color: #6b3f8f; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legend .program::before { background: #cfe3a8; } .legend .rec::before { background: #f1d491; }
.legend .journal::before { background: #b5d0ea; } .legend .inspection::before { background: #d6bfe8; }
.legend .lg::before { background: var(--c); }

/* ---------- погода ---------- */
.wxstrip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(30px, 1fr); gap: 2px; overflow-x: auto; padding-bottom: 4px; }
.wxh { text-align: center; font-size: 10.5px; color: var(--muted); }
.wxh .bar { height: 26px; border-radius: 4px; margin: 3px 0; }
.wxh .bar.ok { background: #8cc97c; } .wxh .bar.mid { background: #f0d27a; } .wxh .bar.no { background: #e9a197; } .wxh .bar.night { background: #dfe3dd; }
.wxdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wxd { border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; background: #fff; font-size: 12.5px; }
.wxd .t { font: 400 18px var(--serif); color: var(--pine); }
.wxd.frost { border-color: #9cc0e4; background: #eef5fc; }
.wxd.heat { border-color: #f0b8a5; background: #fdf1ec; }

/* ---------- карта ---------- */
.map { position: relative; z-index: 0; height: 440px; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background: #e8ece4; }
.map.small { height: 260px; }
.map-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.map-off { display: grid; place-items: center; height: 100%; color: var(--muted); padding: 20px; text-align: center; }
.leaflet-container { font: inherit; }
.plot-label { background: rgba(32,69,52,.85); color: #fff; border: 0; border-radius: 6px; font-weight: 700; padding: 2px 6px; box-shadow: none; }
.plot-label::before { display: none; }
.vtx { background: #fff; border: 3px solid #a8743f; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.4); cursor: grab; }
.vtx-mid { background: rgba(255,255,255,.85); border: 2px dashed #a8743f; border-radius: 50%; color: #a8743f; font: 700 12px/10px system-ui, sans-serif; text-align: center; cursor: copy; opacity: .9; }
.vtx-mid:hover { opacity: 1; background: #fff; }

/* картки кварталів під картою */
.qcards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 14px; }
.qcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; cursor: pointer; }
.qcard.on { border-color: #a8743f; box-shadow: inset 4px 0 0 #a8743f; }
.qcard dl.kv { grid-template-columns: 110px 1fr; font-size: 13px; gap: 4px 10px; margin: 8px 0; }
.qcard .row .btn { min-height: 30px; }

/* компас напрямку рядів */
.compass-wrap { display: grid; grid-template-columns: 130px 1fr; gap: 14px; align-items: center; }
.compass { width: 130px; height: 130px; touch-action: none; cursor: pointer; user-select: none; }
.compass .needle { transition: transform .05s linear; }
fieldset.scheme { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 14px; margin: 12px 0 0; }
fieldset.scheme legend { font-weight: 800; font-size: 13px; color: var(--pine); padding: 0 6px; }
@media (max-width: 560px) { .compass-wrap { grid-template-columns: 1fr; justify-items: center; } }

/* ---------- графіки ---------- */
.chart svg { width: 100%; height: auto; display: block; }
.chart .axis { font-size: 10px; fill: var(--muted); }
.bar-h { display: grid; grid-template-columns: 150px 1fr 80px; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 6px; }
.bar-h .track { height: 12px; background: var(--soft); border-radius: 6px; overflow: hidden; }
.bar-h .fill { height: 100%; background: var(--leaf); border-radius: 6px; }
.meter { height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--leaf); }

/* Аналізи: шкала норми */
.range { position: relative; height: 10px; background: linear-gradient(90deg, #f3d6d0 0 20%, #d7ebcf 20% 80%, #f6e3b9 80% 100%); border-radius: 5px; min-width: 120px; }
.range i { position: absolute; top: -3px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--ink); }

/* ---------- модальне вікно, toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 30, 22, .45); z-index: 100; display: grid; place-items: start center; padding: 40px 14px; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; width: min(640px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(900px, 100%); }
.modal .mh { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal .mb { padding: 18px 20px; }
.modal .mf { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fafbf7; border-radius: 0 0 14px 14px; flex-wrap: wrap; }
.modal .x { background: none; border: 0; font-size: 24px; line-height: 1; color: var(--muted); }
.lightbox img { max-width: 100%; display: block; margin: auto; border-radius: 8px; }
#toast-root { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: tin .2s ease-out; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* ---------- вхід ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .hero { background: var(--pine); color: #eaf1e8; padding: 56px 52px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; }
.login .hero h1 { color: #fff; font-size: clamp(32px, 4vw, 52px); margin: 18px 0 14px; }
.login .hero p { color: #c5d6c9; font-size: 16px; max-width: 520px; }
.login .hero ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 520px; }
.login .hero li { display: flex; gap: 10px; color: #dbe7dd; font-size: 14.5px; }
.login .hero li b { color: var(--lime); }
.login .pick { padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; gap: 14px; max-width: 560px; }
.persona { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; text-align: left; width: 100%; }
.persona:hover { border-color: var(--leaf); box-shadow: var(--shadow); }
.persona .avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--soft); color: var(--pine); display: grid; place-items: center; font-weight: 800; flex: none; }
.persona.agro .avatar { background: var(--lime); }
.persona .t { font-weight: 700; }

/* ---------- сповіщення ---------- */
.notif { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border-bottom: 1px solid #eef1ec; text-decoration: none; color: var(--ink); }
.notif:hover { background: #fafcf6; }
.notif .u { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: transparent; }
.notif.unread .u { background: var(--leaf); }
.notif.unread .tx { font-weight: 700; }

/* ---------- ШІ-агент ---------- */
:root { --ai: #5b4bb7; --ai-soft: #efecfb; }
.ai-dot { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #7a6ae0, #4a9b6f); color: #fff; font-size: 14px; flex: none; }
.ai-dot.sm { width: 18px; height: 18px; border-radius: 6px; font-size: 10px; vertical-align: -3px; margin-right: 3px; }
.ai-toggle { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #cfdcd2; border-radius: 99px; padding: 5px 12px 5px 6px; font-size: 12.5px; font-weight: 700; }
.ai-toggle.on { background: rgba(213,232,137,.16); color: #fff; border-color: rgba(213,232,137,.6); }
.ai-toggle:not(.on) .ai-dot { filter: grayscale(1); opacity: .6; }
.install-btn { margin: 14px 12px 0; width: calc(100% - 24px); }

.fab { position: fixed; right: 22px; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 70; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 99px;
  padding: 12px 20px 12px 14px; background: var(--pine); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 8px 24px rgba(20,44,34,.35); }
.fab .ic { width: 34px; height: 34px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; font-size: 17px; }
.fab:hover { filter: brightness(1.08); }
body.agent-open .fab { display: none; }

.agent-backdrop { position: fixed; inset: 0; background: rgba(15,30,22,.28); z-index: 90; }
.agent-sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); z-index: 91; background: #fbfbf7; display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0,0,0,.18); }
.agent-sheet.anim { animation: slin .18s ease-out; }
@keyframes slin { from { transform: translateX(30px); opacity: .4; } }
.agent-sheet .ah { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.agent-sheet .ah .grow { flex: 1; min-width: 0; }
.agent-sheet .x { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); }
.agent-sheet .ab { flex: 1; overflow-y: auto; padding: 14px; display: grid; gap: 10px; align-content: start; }
.agent-sheet .af { border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; }
.agent-sheet .ex { margin-bottom: 8px; max-height: 92px; overflow-y: auto; }
.agent-sheet .ex .chip { font-size: 12px; font-weight: 500; text-align: left; }
.agent-sheet .quickrow { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 8px; padding-bottom: 3px; scrollbar-width: thin; }
.chip.quick { white-space: nowrap; background: var(--ai-soft); border-color: #dcd6f5; font-size: 12.5px; }
.features { white-space: pre-wrap; font-size: 14px; background: #fafbf7; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.inrow { display: flex; gap: 8px; align-items: flex-end; }
.inrow textarea { min-height: 46px; flex: 1; resize: none; }
.mic, .send { width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; font-size: 19px; flex: none; }
.mic { background: var(--lime); color: var(--pine); }
.mic.big { width: 64px; height: 64px; font-size: 28px; box-shadow: 0 0 0 6px rgba(213,232,137,.35); }
.send { background: var(--pine); color: #fff; }
.mic.rec, .btn.rec { background: #d9493a; color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(217,73,58,.5); } 70% { box-shadow: 0 0 0 12px rgba(217,73,58,0); } 100% { box-shadow: 0 0 0 0 rgba(217,73,58,0); } }
.msg.agent { background: var(--ai-soft); border-color: #dcd6f5; }
.msg.agent.done { background: var(--ok-bg); border-color: #c9e3cf; }
.acard { background: #fff; border: 1px solid #d9d3f3; border-left: 4px solid var(--ai); border-radius: 12px; padding: 12px; }
.acard .formgrid { grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.acard label.f { font-size: 12px; }
.acard textarea { min-height: 60px; }
.acard dl.kv { grid-template-columns: 92px 1fr; font-size: 13.5px; }
.acard details.fix { margin-top: 10px; }
.acard details.fix summary { cursor: pointer; color: var(--pine); font-weight: 700; font-size: 13px; }

.agent-hero { margin-bottom: 16px; background: linear-gradient(120deg, #fff 0%, #f4f1fd 100%); border-color: #dcd6f5; }
.agent-hero .grow { flex: 1; }
.agent-brief { margin-bottom: 16px; border-color: #dcd6f5; background: linear-gradient(180deg, #faf9ff, #fff 60px); }
.brief-item .badge { margin-right: 4px; }
.agent-draft { border-color: #dcd6f5; border-left: 4px solid var(--ai); }
.draft-text { white-space: pre-wrap; background: #faf9ff; border: 1px dashed #cfc7f0; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.facts { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.thinking { color: var(--ai); font-weight: 700; font-size: 13.5px; animation: think 1.4s ease-in-out infinite; }
@keyframes think { 50% { opacity: .45; } }
.agent-brief .how { background: var(--ai-soft); border-radius: 10px; padding: 10px 12px; margin: 0 0 6px; color: #3d3570; }
.acard.agro .quote { margin-top: 8px; background: #f6f7f3; border-left: 3px solid var(--line); padding: 8px 10px; border-radius: 6px; font-size: 13.5px; font-style: italic; }
.acard.agro .t { font-weight: 700; }
.facts li { margin: 2px 0; }

@media (max-width: 860px) {
  .ai-toggle .lbl { display: none; }
  .ai-toggle { padding: 5px; }
  .fab { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); padding: 10px 16px 10px 10px; }
  .agent-sheet { top: auto; width: 100%; height: 92vh; border-radius: 18px 18px 0 0; }
  .agent-sheet.anim { animation: slup .2s ease-out; }
  @keyframes slup { from { transform: translateY(40px); opacity: .4; } }
  .acard .formgrid { grid-template-columns: 1fr; }
  .agent-sheet .ah .tiny { display: none; }
  .agent-sheet .ex { max-height: 70px; }
  .main { padding-bottom: 96px; }
}

/* ---------- знайомство: анімація «як позначити сад» (цикл 14 с) ---------- */
.onb-garden { border-bottom: 1px dashed var(--line); padding-bottom: 10px; margin-bottom: 10px; }
.howto svg { width: 100%; max-height: 340px; display: block; border-radius: 12px; border: 1px solid var(--line); }
.howto .hw-steps { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.howto .hw-steps li { opacity: .4; animation: 14s linear infinite; }
.howto .hw-steps .s1 { animation-name: hwS1; } .howto .hw-steps .s2 { animation-name: hwS2; } .howto .hw-steps .s3 { animation-name: hwS3; } .howto .hw-steps .s4 { animation-name: hwS4; }
@keyframes hwS1 { 0%, 21% { opacity: 1; } 22%, 100% { opacity: .4; } }
@keyframes hwS2 { 0%, 21% { opacity: .4; } 22%, 38% { opacity: 1; } 39%, 100% { opacity: .4; } }
@keyframes hwS3 { 0%, 38% { opacity: .4; } 39%, 79% { opacity: 1; } 80%, 100% { opacity: .4; } }
@keyframes hwS4 { 0%, 79% { opacity: .4; } 80%, 100% { opacity: 1; } }
.hw-map { animation: hwPan 14s ease-in-out infinite; }
@keyframes hwPan { 0% { transform: translate(-40px, -20px); } 16%, 100% { transform: translate(0, 0); } }
.hw-search { animation: hwSearch 14s linear infinite; }
@keyframes hwSearch { 0%, 20% { opacity: 1; } 22%, 100% { opacity: 0; } }
.hw-caret { animation: hwBlink 1s steps(1) infinite; } @keyframes hwBlink { 50% { opacity: 0; } }
.hw-cursor { animation: hwCursor 14s ease-in-out infinite; }
@keyframes hwCursor {
  0%, 14% { transform: translate(330px, 200px); } 22% { transform: translate(185px, 115px); } 30% { transform: translate(185px, 115px); }
  40% { transform: translate(110px, 70px); } 50% { transform: translate(250px, 60px); } 58% { transform: translate(265px, 160px); }
  66% { transform: translate(120px, 170px); } 72%, 78% { transform: translate(110px, 70px); } 86%, 92% { transform: translate(300px, 205px); } 100% { transform: translate(330px, 200px); }
}
.hw-click { opacity: 0; animation: hwClick 14s linear infinite; }
@keyframes hwClick { 0%, 22% { opacity: 0; } 23% { opacity: 1; } 26%, 40% { opacity: 0; } 41% { opacity: 1; } 43%, 50% { opacity: 0; } 51% { opacity: 1; } 53%, 58% { opacity: 0; }
  59% { opacity: 1; } 61%, 66% { opacity: 0; } 67% { opacity: 1; } 69%, 72% { opacity: 0; } 73% { opacity: 1; } 75%, 86% { opacity: 0; } 87% { opacity: 1; } 89%, 100% { opacity: 0; } }
.hw-pin { animation: hwPin 14s ease-out infinite; }
@keyframes hwPin { 0%, 23% { opacity: 0; transform: translateY(-20px); } 26%, 100% { opacity: 1; transform: translateY(0); } }
.hw-line { animation: hwLine 14s linear infinite; }
@keyframes hwLine { 0%, 40% { stroke-dashoffset: 490; } 72%, 100% { stroke-dashoffset: 0; } }
.hw-c { opacity: 0; animation: 14s linear infinite; }
.hw-c.c1 { animation-name: hwC1; } .hw-c.c2 { animation-name: hwC2; } .hw-c.c3 { animation-name: hwC3; } .hw-c.c4 { animation-name: hwC4; }
@keyframes hwC1 { 0%, 40% { opacity: 0; } 41%, 100% { opacity: 1; } } @keyframes hwC2 { 0%, 50% { opacity: 0; } 51%, 100% { opacity: 1; } }
@keyframes hwC3 { 0%, 58% { opacity: 0; } 59%, 100% { opacity: 1; } } @keyframes hwC4 { 0%, 66% { opacity: 0; } 67%, 100% { opacity: 1; } }
.hw-fill { opacity: 0; animation: hwFill 14s linear infinite; } @keyframes hwFill { 0%, 73% { opacity: 0; } 76%, 100% { opacity: 1; } }
.hw-area { opacity: 0; animation: hwArea 14s linear infinite; } @keyframes hwArea { 0%, 77% { opacity: 0; } 79%, 100% { opacity: 1; } }
.hw-save { animation: hwSave 14s linear infinite; } @keyframes hwSave { 0%, 86% { opacity: .55; } 87%, 92% { opacity: 1; } 93%, 100% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .howto * { animation-duration: 0s !important; } }

/* ---------- друк звіту ---------- */
@media print {
  .top, .side, .demo-strip, .noprint, .pagehead .actions, .fab, #agent-root { display: none !important; }
  .layout { display: block; }
  .main { padding: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: 60px; left: 0; bottom: 0; width: 260px; z-index: 60; transform: translateX(-100%); transition: transform .2s; height: auto; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  body.nav-open .side { transform: none; }
  .menu-toggle { display: grid; }
  .main { padding: 18px 16px 60px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .login { grid-template-columns: 1fr; }
  .login .hero, .login .pick { padding: 32px 20px; }
  .brand small, .who .name { display: none; }
  .top .brand { min-width: 0; gap: 8px; font-size: 17px; }
  .top .brand .clogo { width: 32px; height: 32px; }
  .prog { grid-template-columns: 70px repeat(3, minmax(0, 1fr)); }
  .cal .d { min-height: 62px; }
  .cal .ev { font-size: 0; height: 6px; padding: 0; }
  .wxdays { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .formgrid { grid-template-columns: 1fr; }
  .bar-h { grid-template-columns: 100px 1fr 60px; }
  .prog { display: block; }
  .prog .ph { display: none; }
  .prog > div { border-right: 0; }
  .prog .m { position: sticky; top: 60px; }
  .msg { max-width: 100%; }
}

/* програма сезону: власник → усі сади або окремий сад → рік */
.prog-filters{align-items:flex-end;flex-wrap:wrap;gap:12px 20px}
.prog-owner{min-width:260px;max-width:420px;flex:1 1 260px}

/* об'єкти господарства на карті */
.mobj { background: none; border: 0; }
.mobj span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 3px solid var(--c); box-shadow: 0 1px 5px rgba(0,0,0,.45); font-size: 16px; line-height: 1; cursor: pointer; }
.mobj.on span { transform: scale(1.25); box-shadow: 0 0 0 4px rgba(213,232,137,.9), 0 1px 6px rgba(0,0,0,.5); }
.objtypes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.objtypes label { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid #d6e2cc; border-radius: 10px; cursor: pointer; font-size: 13px; line-height: 1.2; }
.objtypes label:has(input:checked) { border-color: #204534; background: #eef4e6; font-weight: 600; }
.objtypes input { position: absolute; opacity: 0; pointer-events: none; }
.objtypes .ic { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--c); background: #fff; font-size: 14px; }
.objlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin-top: 8px; }
.objitem { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid #e3e9dd; border-radius: 12px; background: #fff; }
.objitem.on { border-color: #a8743f; box-shadow: 0 0 0 2px rgba(168,116,63,.25); }
.objitem .ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--c); font-size: 15px; cursor: pointer; }
.objlegend { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: 12px; color: #5d6b60; }

/* карта: звичайний вигляд і «на весь екран» */
.maphint { margin: 8px 0 0; }
/* рельєф і холодне повітря (js/relief.js) */
.relief-read { background: rgba(255, 255, 255, .94); border-radius: 8px; padding: 6px 9px; font-size: 12px; line-height: 1.35; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); max-width: 300px; }
.relief-mode .plot-label { background: rgba(11, 31, 20, .55); font-size: 11px; padding: 1px 6px; box-shadow: none; }
.trace-arrow span { display: block; width: 18px; height: 18px; line-height: 18px; text-align: center; font-size: 13px; color: #ff8c00; text-shadow: 0 0 2px #3a1d00, 0 0 3px #3a1d00; }
.flow-mark { position: relative; }
.flow-mark .ar { display: block; width: 24px; height: 24px; line-height: 24px; text-align: center; font-size: 18px; text-shadow: 0 0 2px #000, 0 0 4px #000; }
.flow-mark.out .ar { color: #fff; }
.flow-mark.in .ar { color: #ff9a1f; }
.flow-mark b { position: absolute; left: 20px; top: -6px; background: #fff; color: #222; border-radius: 99px; font-size: 11px; padding: 0 5px; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.rel-report { margin-top: 10px; border: 1px solid var(--line, #dde3d8); border-radius: 10px; padding: 10px 12px; background: #fff; }
.rel-report .zl { cursor: pointer; border-radius: 6px; padding: 1px 3px; margin: -1px -3px; }
.rel-report .zl:hover { background: #f2f5ee; }
.rel-report .zl.on { background: #fff4c2; box-shadow: inset 0 0 0 1px #e8c33a; }
.night-panel { position: absolute; z-index: 1000; left: 54px; top: 10px; width: 290px; max-width: calc(100% - 70px); background: rgba(14, 24, 48, .92); color: #e8eefc; border-radius: 12px; padding: 10px 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, .4); font-size: 13px; }
.night-panel .np-x { background: none; border: 0; color: #cfd8ef; font-size: 16px; cursor: pointer; }
.night-panel .np-clock { font: 700 30px/1.1 var(--serif, serif); margin: 4px 0 6px; letter-spacing: .02em; }
.night-panel .np-temps { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.night-panel .np-temps div { background: rgba(255, 255, 255, .08); border-radius: 8px; padding: 5px 8px; }
.night-panel .np-temps span { display: block; font-size: 11px; color: #a9b6d6; }
.night-panel .np-temps b { font-size: 18px; }
.night-panel .np-temps b.frost { color: #9fd0ff; }
.night-panel .np-frost { color: #9fd0ff; font-weight: 700; min-height: 18px; margin: 4px 0 2px; }
.night-panel .np-text { min-height: 54px; line-height: 1.4; }
.night-panel .np-bar { height: 4px; background: rgba(255, 255, 255, .15); border-radius: 2px; margin: 8px 0; }
.night-panel .np-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f5a64a, #5b6fd8 30%, #3a3fb0 70%, #f5d36a); border-radius: 2px; }
.night-panel .np-ctl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.night-panel .np-ctl input { width: 52px; padding: 2px 4px; }
.night-panel input, .night-panel select { color: #1d2a22; background: #fff; }
.night-panel .btn.ghost { color: #e8eefc; border-color: rgba(255, 255, 255, .35); }
.night-panel .btn { color: #1d2a22; }
.night-panel .tiny.muted { color: #93a1c4; }
.night-panel .np-temps.three { grid-template-columns: 1fr 1fr 1fr; }
.night-panel .np-temps.three b { font-size: 16px; }
.temp-panel { position: absolute; z-index: 1000; left: 54px; top: 10px; width: 310px; max-width: calc(100% - 70px); max-height: calc(100% - 20px); overflow: auto; background: rgba(255, 255, 255, .96); color: #1d2a22; border-radius: 12px; padding: 10px 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, .3); font-size: 13px; }
.temp-panel .np-x { background: none; border: 0; font-size: 16px; cursor: pointer; }
.temp-panel .tp-st { margin: 6px 0; }
.temp-panel .tp-in { display: grid; gap: 6px; margin: 6px 0; }
.temp-panel .tp-in label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.temp-panel .tp-in input { width: 64px; }
.temp-panel .tp-in select { max-width: 180px; }
.temp-panel .tp-res { background: #f3f6f1; border-radius: 8px; padding: 6px 8px; line-height: 1.45; }
.temp-panel .tp-res b.c { color: #2a49c8; }
.temp-panel .tp-res b.w { color: #c4521f; }
.temp-panel .tp-frost { color: #1f4fae; font-weight: 700; margin-top: 3px; }
.temp-panel .tp-scale { display: flex; flex-wrap: wrap; gap: 3px 8px; margin: 6px 0; font-size: 11px; }
.temp-panel .tp-scale i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin-right: 3px; vertical-align: -1px; }
.temp-panel .tp-cur { margin: 4px 0; }
.protect-panel { width: 340px; }
.protect-panel .pp-sum { margin-top: 6px; }
.protect-panel .pp-tab { width: 100%; border-collapse: collapse; font-size: 11px; margin: 6px 0; }
.protect-panel .pp-tab th, .protect-panel .pp-tab td { border-bottom: 1px solid #e3e8df; padding: 3px 4px; text-align: left; vertical-align: top; }
.protect-panel .pp-tab th { color: #4a5a50; font-weight: 700; }
.protect-panel h5 { margin: 8px 0 2px; font-size: 12px; }
.protect-panel .pp-set { margin: 6px 0; }
.protect-panel .pp-how { margin: 6px 0; }
.protect-panel .pp-how summary { cursor: pointer; }
.protect-panel .pp-cs { width: 100%; height: auto; border-radius: 6px; background: #eef2ec; margin-top: 4px; }
.protect-panel .pp-cs-txt { line-height: 1.4; }
.protect-panel .pp-set summary { cursor: pointer; }
.pp-fan { display: flex; align-items: center; gap: 2px; transform: translate(-50%, -50%); background: #0f6b5a; color: #fff; border-radius: 99px; padding: 1px 7px 1px 4px; font-size: 12px; white-space: nowrap; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.pp-tag { transform: translate(-50%, -50%); white-space: nowrap; font-size: 10px; font-weight: 700; border-radius: 6px; padding: 1px 5px; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.pp-tag.bar { background: #7a4a12; color: #fff; }
.pp-tag.exit { background: #2f6b3a; color: #fff; }
.pp-th { transform: translate(-50%, -50%); background: #fff; border-radius: 99px; padding: 0 5px; font-size: 12px; white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.pp-th small { font-size: 9px; margin-left: 2px; color: #4a5a50; }
.temp-panel .tp-areabox { border-top: 1px solid #e3e8df; margin-top: 6px; padding-top: 6px; }
.temp-panel .tp-areabox input { width: 52px; padding: 1px 4px; }
.temp-panel .tp-hrow { display: grid; grid-template-columns: 78px 1fr 52px 32px; gap: 6px; align-items: center; font-size: 11px; margin: 2px 0; }
.temp-panel .tp-hrow i { display: block; height: 10px; border-radius: 3px; }
.temp-panel .tp-hrow b { text-align: right; }
.temp-panel .tp-hrow em { font-style: normal; color: #6b776f; text-align: right; }
.temp-panel .tp-below { margin: 6px 0 2px; padding: 4px 6px; border-radius: 6px; background: #f3f6f1; }
.temp-panel .tp-below.bad { background: #e5ecff; color: #1f3f9e; }
.temp-panel .tp-riskhead { margin-top: 6px; font-weight: 700; color: #1f3f9e; font-size: 12px; }
.temp-panel .tp-ev { font-size: 12px; margin: 3px 0; line-height: 1.4; }
.temp-panel .tp-ev.ok { color: #2f6b3a; margin-top: 6px; }
.temp-panel .tp-hint { margin: 4px 0; }
.temp-label { background: rgba(255, 255, 255, .92); border-radius: 6px; padding: 1px 6px; font-size: 11px; white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transform: translate(-50%, -50%); text-align: center; line-height: 1.25; }
.temp-label b { display: block; font-size: 10px; color: #4a5a50; }
.temp-label span { font-weight: 700; }
.temp-station { display: flex; align-items: center; gap: 3px; background: #1d3b2c; color: #fff; border-radius: 99px; padding: 2px 8px 2px 4px; font-size: 12px; white-space: nowrap; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); transform: translate(-50%, -50%); }
.temp-mode .plot-label { display: none; }
.temp-isle.in span { font-size: 10px; line-height: 14px; padding: 0 4px; border-width: 1.5px; background: rgba(255, 255, 255, .95); }
.site-zone { transform: translate(-50%, -50%); background: rgba(20, 60, 30, .9); color: #fff; border-radius: 99px; padding: 2px 9px; font-size: 12px; white-space: nowrap; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); }
.site-zone b { color: #c8f27a; font-size: 14px; margin-right: 2px; }
.site-zone { cursor: pointer; border: 2px solid #fff; }
.site-zone.on { background: #ffd23f; color: #1d2a22; border-color: #1d2a22; }
.site-zone.on b { color: #1d2a22; }
.site-prob { transform: translate(-50%, -50%); cursor: pointer; white-space: nowrap; font-size: 10px; font-weight: 700; border-radius: 6px; padding: 1px 6px; color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); opacity: .92; }
.site-prob.bad { background: #961414; }
.site-prob.fair { background: #be6e00; }
.site-prob.on { background: #ffd23f; color: #1d2a22; opacity: 1; }
.site-legend i.ln { height: 0; width: 14px; border-top: 3px solid; border-radius: 0; vertical-align: 3px; }
.site-legend i.ln.w { border-color: #fff; box-shadow: 0 0 0 1px #1d2a22; }
.site-legend i.ln.r { border-color: #961414; }
.site-bad { color: #961414; font-weight: 700; }
.site-fair { color: #be6e00; font-weight: 700; }
#site-report .item.on { background: #fff4c2; }
.site-season { border: 1px solid #dfe6da; border-radius: 10px; padding: 10px 12px; margin: 12px 0; background: #fbfcf9; }
.site-season h4 { margin-top: 0; }
.season-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 6px 14px; margin: 6px 0 8px; }
.season-in label { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.season-in input[type=number] { width: 62px; }
.season-tab { width: 100%; border-collapse: collapse; font-size: 12px; margin: 6px 0 10px; }
.season-tab th, .season-tab td { border-bottom: 1px solid #e3e8df; padding: 4px 6px; text-align: left; vertical-align: top; }
.season-tab th { color: #4a5a50; }
.season-tab tr.cur { background: #f3f6f1; }
.site-hot { color: #b8321f; }
.site-ok { color: #2f6b3a; font-weight: 700; }
@media (max-width: 600px) { .season-tab { font-size: 11px; } }
.site-legend { display: inline-flex; gap: 10px; margin-left: auto; font-size: 12px; }
.site-legend i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.site-bars { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin: 4px 0 10px; }
.site-bars i { display: block; height: 100%; }
.site-letter { display: inline-block; min-width: 22px; text-align: center; background: #1d3b2c; color: #c8f27a; border-radius: 6px; padding: 0 5px; }
.site-risks { margin: 4px 0 8px; padding-left: 18px; font-size: 13px; line-height: 1.5; }
@media print { .side, .top, .mapcard .map-tools, #site-views, .banner.info { display: none !important; } }
.temp-isle span { display: inline-block; transform: translate(-50%, -50%); background: rgba(255, 255, 255, .92); border: 2px solid #888; border-radius: 99px; padding: 0 6px; font-size: 11px; font-weight: 700; color: #1d2a22; white-space: nowrap; line-height: 16px; }
.temp-panel .tp-head { position: sticky; top: -10px; background: inherit; }
.temp-panel.folded .tp-body { display: none; }
.temp-panel .tp-tl { border-top: 1px solid #e3e8df; border-bottom: 1px solid #e3e8df; padding: 6px 0; margin: 6px 0; }
.temp-panel .tp-now { margin: 2px 0 4px; line-height: 1.35; }
.temp-panel .tp-scen-grid { display: grid; grid-template-columns: 44px 58px 1fr; gap: 3px 6px; align-items: center; }
.temp-panel .tp-scen-grid input { width: 58px; padding: 2px 4px; }
.temp-panel .tp-scen-grid select { font-size: 11px; padding: 2px; }
@media (max-width: 600px) {
  .temp-panel, .night-panel { left: 8px; right: 8px; width: auto; max-width: none; top: auto; bottom: 8px; max-height: 55%; }
}
.flow-mark.dim { opacity: .35; }
.flow-mark.on .ar { color: #ffd23f; }
.rel-report h5 { margin: 10px 0 4px; font-size: 13px; }
.rel-report ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.45; }
.rel-report li { margin: 2px 0; }
.rel-report .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; opacity: .85; }
.rel-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; font-size: 12px; }
.rel-legend i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; opacity: .8; }
.rel-legend i.flow { height: 3px; background: #142d8c; vertical-align: 2px; }
.rel-legend .ramp { width: 100%; height: 10px; border-radius: 4px; background: linear-gradient(90deg, #2c7bb6, #78c6a0, #f0e28c, #de9650, #a85032); }
.rel-list { margin-top: 10px; }
.rel-list .item { cursor: pointer; }
.relbadge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: #e8eef7; color: #2a4a7a; }
.relbadge.c0 { background: #e6f2e6; color: #2f6b3a; }
.relbadge.c2 { background: #d6e3fb; color: #1f4fae; }
.relbadge.c3 { background: #e4d9fb; color: #4a1fa8; }
.mapcard.full { position: fixed; inset: 0; z-index: 80; margin: 0; border-radius: 0; border: 0; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; background: #f7f7f2; }
.mapcard.full .map-tools { margin: 0; }
.mapcard.full .mapbody { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; }
.mapcard.full .mapmain { display: flex; flex-direction: column; min-height: 0; }
.mapcard.full .map { flex: 1; height: auto; min-height: 300px; }
.mapcard.full .maphint { display: none; }
.mapcard.full .mapside { overflow-y: auto; min-height: 0; padding-right: 4px; }
.mapcard.full .mapside > fieldset:first-child, .mapcard.full .mapside > .row:first-child { margin-top: 0 !important; }
.mapcard.full .qcards, .mapcard.full .objlist { grid-template-columns: 1fr; }
body.map-full { overflow: hidden; }
body.map-full .fab { display: none; }
@media (max-width: 900px) {
  .mapcard.full .mapbody { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) 38vh; }
}

/* поля «позначками» (сорти) і «свій варіант» */
div.f { display: grid; gap: 6px; font-size: 13px; }
div.f .flabel { font-weight: 700; color: var(--ink); }
.tags { display: grid; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.tagchips { display: flex; flex-wrap: wrap; gap: 6px; }
.tagchip { border: 1px solid #cfdcc4; background: #f6f8f2; color: var(--ink); border-radius: 99px; padding: 5px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.tagchip.on { background: #204534; border-color: #204534; color: #fff; }
.tagchip.on::before { content: "✓ "; }
.tagadd { display: flex; gap: 6px; }
.tagadd input { flex: 1; min-width: 0; }
.choice-own { margin-top: 6px; }

/* погода: роса, ніч, графіки, калькулятор */
.wxh .bar { position: relative; }
.wxh .bar.dew { background: #a99be0; }
.wxh.is-night .bar { box-shadow: inset 0 3px 0 #2c3e50; }
.wxh .moon { position: absolute; top: 3px; left: 0; right: 0; font-style: normal; font-size: 10px; color: #2c3e50; line-height: 1; }
.wxchart { width: 100%; height: auto; display: block; margin-top: 4px; }
.wxlegend .lg.dash::before { background: repeating-linear-gradient(90deg, var(--c) 0 5px, transparent 5px 8px); height: 3px; border-radius: 0; }
.wxkpi { gap: 8px; }
.wxkpi .kpi { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.wxkpi .kpi .v { font-size: 22px; }

/* тарифи */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.plan { position: relative; border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 16px; display: flex; flex-direction: column; }
.plan h3 { margin: 2px 0 6px; }
.plan.pop { border: 2px solid #204534; box-shadow: 0 6px 24px rgba(32,69,52,.12); }
.plan.cur { background: #f3f8ec; }
.plan-flag { position: absolute; top: -11px; left: 14px; background: #204534; color: #fff; font-size: 11px; padding: 2px 10px; border-radius: 99px; }
.plan-price { font: 400 32px var(--serif); color: var(--pine); }
.plan-price small { font: 400 13px var(--sans, inherit); color: var(--muted); margin-left: 2px; }
.plan > div:last-child { margin-top: auto !important; padding-top: 12px; }
.plans-t td, .plans-t th { text-align: center; vertical-align: middle; }
.plans-t td:first-child, .plans-t th:first-child { text-align: left; }
.plans-t .pop { background: #f3f8ec; }
.plans-t tr.grp td { background: #eef3ea; font-weight: 700; text-align: left; font-size: 12.5px; }
.plans-t .yes { color: #2f7a3f; font-weight: 700; } .plans-t .no { color: #b9c2b8; }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } .svc { grid-template-columns: 1fr !important; } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }
.msg.locked { background: #fff7e6; border: 1px dashed #e0b45c; }
.pay-card { align-items: flex-start; }
.qcard.zone { border-left: 5px solid var(--zc); }
