/* Кабінет лісівника: вхід через Дію і «Мої карти». Шрифти e-Ukraine і знак Дія.Підпис за логобуком Дії. */
@font-face { font-family: 'e-Ukraine'; src: url('/fonts/e-Ukraine-Regular.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'e-Ukraine'; src: url('/fonts/e-Ukraine-Medium.otf') format('opentype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'e-UkraineHead'; src: url('/fonts/e-UkraineHead-Medium.otf') format('opentype'); font-weight: 500; font-display: swap; }

:root {
  --bg: #f3f4f1;
  --card: #ffffff;
  --fg: #16181a;
  --mut: #5b6167;
  --faint: #8b9197;
  --line: #e2e4df;
  --acc: #2f6b3a;          /* лісовий зелений: акцент кабінету */
  --acc-soft: #e8f1e9;
  --err: #a1261d;
  --err-bg: #fbeceb;
  --radius: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.stack { display: flex; flex-direction: column; gap: 14px; align-items: center; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.55 'e-Ukraine', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
h1, h2 { font-family: 'e-UkraineHead', 'e-Ukraine', system-ui, sans-serif; font-weight: 500; }

/* --- вхід ------------------------------------------------------------------ */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; gap: 18px; }
.auth .card {
  width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
}
.auth .sign { height: 44px; width: auto; display: block; }
.auth h1 { font-size: 24px; margin: 4px 0 0; }
.auth .lead { color: var(--mut); margin: 0; }
.auth .qr { width: 220px; height: 220px; border-radius: 8px; overflow: hidden; }
.auth .qr svg { width: 100%; height: 100%; display: block; }
.hint { color: var(--mut); font-size: 13.5px; margin: 0; }
.error { color: var(--err); background: var(--err-bg); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 0; }
.foot { color: var(--faint); font-size: 12.5px; margin: 0; text-align: center; }

/* Кнопка з білим знаком Дія.Підпис: висота знака не менше 24 px, 8 px до країв (логобук) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  border: 0; border-radius: 10px; padding: 12px 28px 12px 24px; min-height: 48px;
  font: 500 15px/1.2 'e-Ukraine', system-ui, sans-serif; text-decoration: none; cursor: pointer;
}
.btn img { height: 24px; width: auto; display: block; }
.btn-primary { background: #000; color: #fff; }
.btn-primary:hover { background: #26282a; }
.btn-secondary { background: #eceee9; color: var(--fg); }
.btn-secondary:hover { background: #e2e5df; }

/* --- «Мої карти»: проекція сайту порталу ------------------------------------------ */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px;
       background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.top h1 { font-size: 20px; margin: 0; }
.brand { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.site { font-size: 13px; color: var(--mut); overflow-wrap: anywhere; }
.site a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.site a:hover { color: var(--acc); }
.who { color: var(--mut); font-size: 13.5px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.who button, .who a { background: none; border: 0; color: var(--acc); font: inherit; cursor: pointer; padding: 0; text-decoration: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 22px 16px 40px; }
.note { background: var(--acc-soft); border-radius: 12px; padding: 12px 16px; color: var(--mut); font-size: 13.5px; margin: 0 0 18px; }
.warn { background: #fff5e0; color: #7a5200; border-radius: 12px; padding: 10px 16px; font-size: 13.5px; margin: 0 0 18px; }
.crumbs { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; flex-wrap: wrap; }
.crumbs button { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
                 font: 500 13.5px 'e-Ukraine', system-ui, sans-serif; color: var(--fg); cursor: pointer; }
.crumbs button:hover { border-color: var(--acc); color: var(--acc); }
.crumbs h2 { font-size: 18px; margin: 0; overflow-wrap: anywhere; }

/* Кнопки стільниками, як на головній геопорталу (gis.lisproekt.gov.ua, клас .hexagon, звірено 11.11.2026):
   шестикутник 200×250, та сама обрізка, зелений #67e267, підпис великими 16 px 600 з інтервалом 1 px,
   іконка 80 px, ряди по центру, кожен наступний піднято на 60 px; наведення: блакитний і зменшення до 0,8.
   Ряди складає скрипт сторінки (повний ряд і на одну кнопку коротший, як 6/5 на порталі). */
:root { --hx-w: 200px; --hx-h: 250px; --hx-gap: 10px; --hx-lift: 60px; --hx-bg: #67e267; --hx-hover: deepskyblue;
        --hx-fg: #4c4c4c; --hx-off: #cdd5cd; --hx-title: 16px; --hx-ico: 80px; }
.tiles { display: flex; flex-direction: column; align-items: center; padding: 4px 0 8px; }
.wrap-hx { max-width: 1360px; }   /* як ширина головної порталу: 6 шестикутників у ряд */
.hx-row { display: flex; justify-content: center; }
.hx-row + .hx-row { margin-top: calc(-1 * var(--hx-lift)); }
.tile { position: relative; flex: none; width: var(--hx-w); height: var(--hx-h); margin: 0 var(--hx-gap);
        clip-path: polygon(0 25%, 50% 0, 100% 25%, 100% 70%, 50% 95%, 0 70%);
        background: var(--hx-bg); color: var(--hx-fg); text-decoration: none; text-align: center;
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        /* відступи від розміру шестикутника: відсотки у флексі рахувались би від ширини ряду */
        padding: calc(var(--hx-h) * .15) calc(var(--hx-w) * .13) calc(var(--hx-h) * .19); transition: .5s; outline: none; }
.tile .ico { width: var(--hx-ico); max-width: 45%; height: auto; max-height: 34%; object-fit: contain; flex: none; }
.tile .ico-none { display: none; }
.tile .body { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.tile .kind { display: none; }
.tile h3 { font: 600 var(--hx-title)/1.2 'Avenir Next', 'e-UkraineHead', 'e-Ukraine', system-ui, sans-serif; letter-spacing: 1px;
           text-transform: uppercase; color: var(--hx-fg); margin: 10px 0 0; overflow-wrap: anywhere; hyphens: auto; }
.tile.hx-long h3 { font-size: calc(var(--hx-title) - 3px); letter-spacing: .5px; }
.tile .meta { font-size: 11.5px; line-height: 1.25; color: #2f4a33; }
a.tile:hover, a.tile:focus-visible { background: var(--hx-hover); transform: scale(.8); }
.tile-off { background: var(--hx-off); cursor: default; }
.tile-off .ico { filter: grayscale(1); opacity: .5; }
.tile-off h3, .tile-off .meta { color: #6b726b; }
.badge { font-size: 11px; border-radius: 999px; padding: 2px 8px; line-height: 1.3; letter-spacing: 0; }
.badge-mine { background: #1f5c2a; color: #fff; }
.badge-closed { background: rgba(255,255,255,.7); color: #5b6167; }
.badge-unknown { background: #fff5e0; color: #7a5200; }
.empty { color: var(--mut); padding: 40px 0; text-align: center; }
@media (max-width: 768px) {
  :root { --hx-w: 150px; --hx-h: 188px; --hx-gap: 6px; --hx-lift: 45px; --hx-title: 12.5px; --hx-ico: 56px; }
  .tile h3 { letter-spacing: .5px; margin-top: 6px; }
  .tile.hx-long h3 { font-size: 11px; letter-spacing: 0; }
  .tile .meta, .badge { font-size: 10px; }
}

/* --- оператор ------------------------------------------------------------------ */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 0 0 16px; }
.panel h2 { font-size: 16px; margin: 0 0 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 0 0 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.stat b { display: block; font: 500 22px/1.2 'e-UkraineHead', 'e-Ukraine', system-ui, sans-serif; }
.stat span { font-size: 12.5px; color: var(--mut); }
.form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--mut); flex: 1 1 200px; }
.form input { font: 400 14.5px 'e-Ukraine', system-ui, sans-serif; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; }
.form input:focus { outline: 2px solid var(--acc-soft); border-color: var(--acc); }
.btn-small { border: 0; border-radius: 10px; padding: 10px 16px; font: 500 14px 'e-Ukraine', system-ui, sans-serif; cursor: pointer;
             background: var(--acc); color: #fff; }
.btn-small:disabled { opacity: .5; cursor: default; }
.btn-link { background: none; border: 0; color: var(--err); font: inherit; cursor: pointer; padding: 0; }
.msg { font-size: 13.5px; margin: 10px 0 0; }
.msg.ok { color: var(--acc); }
.msg.bad { color: var(--err); }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 500; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .03em;
          padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr.revoked td { color: var(--faint); }
.pill { display: inline-block; font-size: 12px; border-radius: 999px; padding: 2px 9px; background: var(--acc-soft); color: var(--acc); }
.pill.off { background: #ececea; color: var(--mut); }
.filter { font: 400 14px 'e-Ukraine', system-ui, sans-serif; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; width: 100%; max-width: 320px; margin: 0 0 10px; }

@media (max-width: 560px) {
  .top { padding: 12px 16px; }
}

/* --- демо-вхід (лише локально) ----------------------------------------------------- */
.demo { border-top: 1px dashed var(--line); padding-top: 14px; width: 100%; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.demo .hint { font-size: 12.5px; }
