/* רישיונות כריתה - styles of statics/reports/licences.js (phase 1, Ram 2026-11-04). Ported from the approved LAN mockup; day / night / contrast come from the site's own theme attribute. */
:root { --sh-card:#fff; --sh-row2:#fafcf8; --sh-hover:#f1f7ee; --sh-head:#eaf1e6; --sh-head2:#e3efd6; --sh-line:#d9dfd6; }
  :root[data-theme="fashion"] { --sh-card:#1d2a22; --sh-row2:#222f27; --sh-hover:#2b3b31; --sh-head:#2f4637; --sh-head2:#35503f; --sh-line:#3a4b40; }
  :root[data-theme="zebra"] { --sh-card:#ffffff; --sh-row2:#f0f0f0; --sh-hover:#e0e0e0; --sh-head:#000000; --sh-head2:#000000; --sh-line:#000; }
  :root[data-theme="zebra"] .sheet thead th { color:#fff; }
  :root[data-theme="fashion"] .take { color:#a6e8b6; border-color:#a6e8b6; background:transparent; }
  :root[data-theme="fashion"] .take.on { background:#2e7d46; color:#fff; }
  :root[data-theme="fashion"] a { color:#8cc4ff; }

  :root { --ok:#2e7d46; --ok-bg:#e6f3e8; --warn:#b4570a; --warn-bg:#fdf0df; --info:#1f5fa8; --info-bg:#e5eefa; --line:#d9dfd6; --sheet-h:34px; }
  
  .lic-app { max-width: 1500px; margin:0 auto; padding: 0 16px 60px; }
  h1 { font-size: clamp(22px, 3.4vw, 32px); margin: 6px 0 2px; }
  .lede { color:#4f5b53; margin:0 0 10px; font-size:14px; }
  .links { font-size:13px; color:#4f5b53; display:flex; flex-wrap:wrap; gap:4px 14px; margin-bottom:12px; }
  .links a { color: var(--info); }
  .cards { display:grid; grid-template-columns: repeat(4, 1fr); gap:10px; margin: 8px 0 12px; }
  .stat { background:var(--sh-card); border-radius:12px; border:1px solid var(--line); padding:10px 12px; text-align:right; cursor:pointer; font:inherit; }
  .stat b { display:block; font-size:24px; color:#1b3a5c; }
  .stat span { font-size:12px; color:#586; }
  .stat[aria-pressed="true"] { outline:2px solid var(--ok); }
  .sub { background:var(--ok-bg); border:1px solid #b9dcc0; border-radius:12px; padding:10px 12px; display:flex; flex-wrap:wrap; gap:8px 10px; align-items:center; margin-bottom:12px; }
  .sub strong { font-size:14px; }
  .sub select, .sub button, .fbar select, .fbar input[type=search] { font:inherit; font-size:14px; border:1px solid #b9c4b8; border-radius:8px; padding:6px 8px; background:var(--sh-card); }
  .sub .btn, .btn { background:var(--ok); color:#fff; border:0; border-radius:8px; padding:7px 14px; font:inherit; font-size:14px; cursor:pointer; }
  .sub .btn.ghost, .btn.ghost { background:var(--sh-card); color:var(--ok); border:1px solid var(--ok); }
  .sub select { flex:0 1 220px; }
  .who { margin-inline-start:auto; font-size:13px; color:#355; }
  .fbar { background:var(--sh-card); border:1px solid var(--line); border-radius:12px; padding:10px 12px; margin-bottom:8px; }
  .frow { display:flex; flex-wrap:wrap; gap:8px 18px; align-items:flex-start; }
  .fgroup { display:flex; flex-direction:column; gap:3px; }
  .fgroup > label.t { font-size:11px; color:#667; }
  .seg { display:flex; flex-wrap:wrap; gap:4px; }
  .seg button { border:1px solid #c5cfc3; background:#f6f8f4; border-radius:14px; padding:3px 10px; font:inherit; font-size:13px; cursor:pointer; white-space:nowrap; }
  .seg button i { font-style:normal; color:#6a7a6a; font-size:12px; margin-inline-start:4px; }
  .seg button[aria-pressed="true"] { background:var(--ok); color:#fff; border-color:var(--ok); }
  .seg button[aria-pressed="true"] i { color:#d8f0dc; }
  .seg button.zero { opacity:.45; }
  .fbar .count { margin-inline-start:auto; font-size:14px; font-weight:600; align-self:center; }
  .fbar .count em { color:var(--ok); font-style:normal; }
  .chips { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 10px; min-height:0; }
  .chip-x { background:#eef3ec; border:1px solid #cdd8cb; border-radius:14px; padding:2px 10px; font-size:12px; cursor:pointer; }
  .tools { display:flex; gap:8px; margin:0 0 6px; flex-wrap:wrap; font-size:13px; }
  .tools button { background:var(--sh-card); border:1px solid var(--line); border-radius:8px; padding:4px 10px; font:inherit; font-size:13px; cursor:pointer; }
  .mfilter { display:none; }
  /* ---------- desktop: spreadsheet ---------- */
  .sheetwrap { background:var(--sh-card); border:1px solid var(--line); border-radius:10px; overflow:auto; max-height: 70vh; }
  table.sheet { border-collapse: separate; border-spacing:0; width:100%; font-size:13px; }
  .sheet thead th { position:sticky; top:0; z-index:3; background:var(--sh-head); border-bottom:2px solid #b9c9b4; padding:6px 8px; text-align:right; font-weight:600; white-space:nowrap; cursor:pointer; height: var(--sheet-h); }
  .sheet thead th.new { background:var(--sh-head2); }
  .sheet td { padding:4px 8px; border-bottom:1px solid #e6ebe3; border-inline-start:1px solid #f0f3ee; height: var(--sheet-h); vertical-align:middle; white-space:nowrap; max-width: 150px; overflow:hidden; text-overflow:ellipsis; }
  .sheet tbody tr:nth-child(even) td { background:var(--sh-row2); }
  .sheet tbody tr:hover td { background:var(--sh-hover); }
  .sheet td.sticky, .sheet th.sticky { position:sticky; z-index:2; }
  .sheet tbody td.sticky { background:var(--sh-card); }
  .sheet tbody tr:nth-child(even) td.sticky { background:var(--sh-row2); }
  .sheet thead th.sticky { z-index:6; background:var(--sh-head); }
  .sheet thead th { z-index:5; box-shadow:0 2px 0 #b9c9b4, 0 4px 8px rgba(0,0,0,.08); }
  .sheet tbody td.sticky { z-index:2; }
  .s1 { right:0; min-width:92px; } .s2 { right:92px; min-width:150px; max-width:190px; box-shadow:-2px 0 0 #dfe6dc inset; }
  .num { text-align:center; }
  .days-hot { color:#a1280d; font-weight:700; }
  .pill { display:inline-block; border-radius:10px; padding:1px 8px; font-size:12px; }
  .pill.open { background:var(--warn-bg); color:var(--warn); }
  .pill.chk { background:var(--info-bg); color:var(--info); }
  .pill.closed { background:transparent; color:var(--muted,#5a6672); border:1px solid currentColor; }
  .closedsw { display:inline-flex; align-items:center; gap:6px; min-height:44px; font-size:14px; cursor:pointer; }
  .closedsw input { width:20px; height:20px; }
  .flag { display:inline-flex; align-items:center; gap:4px; background:var(--ok-bg); color:#1d5a30; border-radius:10px; padding:1px 8px; font-size:12px; font-weight:600; }
  .flag.mine { background:var(--ok); color:#fff; }
  .arar { display:inline-block; background:#f6e3f0; color:#7a2459; border-radius:10px; padding:1px 8px; font-size:12px; margin-inline-start:4px; }
  .act a, .act button { text-decoration:none; background:none; border:0; cursor:pointer; font-size:15px; padding:0 3px; }
  .take { font:inherit; font-size:12px; border:1px solid var(--ok); color:var(--ok); background:var(--sh-card); border-radius:12px; padding:1px 9px; cursor:pointer; }
  .take.on { background:var(--ok); color:#fff; }
  .cardlist { display:none; }
  .more { text-align:center; margin:10px; }
  /* ---------- phone: task cards ---------- */
  @media (max-width: 900px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
    .sheetwrap { display:none; }
    .cardlist { display:grid; gap:10px; grid-template-columns:minmax(0,1fr); }
    .lic { min-width:0; overflow-wrap:anywhere; }
    .deskf { display:none; }
    .fbar .count { margin:0; }
    .mfilter { display:flex; gap:8px; align-items:center; }
    .mfilter .btn { flex:0 0 auto; }
    .mfilter input[type=search] { flex:1 1 auto; min-width:0; }
    .lic { background:var(--sh-card); border:1px solid var(--line); border-radius:14px; padding:12px; position:relative; border-inline-start:6px solid #b9c9b4; }
    .lic.open { border-inline-start-color: var(--warn); }
    .lic.taken { border-inline-start-color: var(--ok); }
    .lic .h { display:flex; justify-content:space-between; gap:8px; align-items:flex-start; }
    .lic .city { font-size:13px; color:#566; }
    .lic .addr { font-weight:700; font-size:16px; }
    .lic .days { text-align:center; line-height:1.1; }
    .lic .days b { display:block; font-size:22px; }
    .lic .days span { font-size:11px; color:#667; }
    .lic .facts { display:grid; grid-template-columns: auto 1fr; gap:3px 10px; font-size:13px; margin:8px 0; }
    .lic .facts dt { color:#667; } .lic .facts dd { margin:0; }
    .lic .row { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:8px; }
    .lic .take { padding:7px 14px; font-size:14px; border-radius:10px; }
    .lic .act a { font-size:19px; padding:0 4px; }
  }
  .sheetfab { display:none; }
  dialog { border:0; border-radius:16px; padding:18px; max-width:420px; width:calc(100% - 32px); box-shadow:0 12px 40px rgba(0,0,0,.25); }
  dialog::backdrop { background:rgba(0,0,0,.4); }
  dialog h3 { margin:0 0 6px; } dialog p { font-size:14px; color:#445; margin:6px 0; }
  .sheetm { position:fixed; inset-inline:0; bottom:0; background:var(--sh-card); border-radius:18px 18px 0 0; padding:14px 16px 18px; z-index:60; box-shadow:0 -8px 30px rgba(0,0,0,.25); max-height:78vh; overflow:auto; display:none; }
  .sheetm.show { display:block; }
  .sheetm .fgroup { margin-bottom:12px; }
  .toast { position:fixed; top:auto; height:auto; border:0; overflow:visible; bottom:14px; inset-inline:14px; margin:auto; max-width:420px; background:#243; color:#fff; border-radius:12px; padding:10px 14px; font-size:14px; z-index:80; display:none; }

  /* ---------- licence card (case page) ---------- */
  #card { padding:0; margin:0; position:fixed; inset-block:0; inset-inline-end:0; inset-inline-start:auto; height:calc(100vh / var(--a11y-zoom,1.3)); max-height:calc(100vh / var(--a11y-zoom,1.3)); width:min(500px, calc(94vw / var(--a11y-zoom,1.3))); max-width:none; overflow:auto; border-radius:16px 0 0 16px; }
  :root[dir="rtl"] #card { border-radius:0 16px 16px 0; }
  @media (max-width: 900px) { dialog#card .ch { position:static; } dialog#card .ch .hdr-row { flex-wrap:nowrap; gap:4px; } dialog#card .ch .hdr-row .take { white-space:nowrap; padding:6px 9px; font-size:14px; } #card, :root[dir="rtl"] #card { inset-inline:0; width:calc(100vw / var(--a11y-zoom,1.3)); top:auto; bottom:0; height:calc(92vh / var(--a11y-zoom,1.3)); max-height:calc(92vh / var(--a11y-zoom,1.3)); border-radius:18px 18px 0 0; } }
  dialog#card::backdrop { background:rgba(10,20,12,.5); }
  .w95ico { position:relative; display:inline-flex; align-items:center; justify-content:center; width:26px; height:24px; margin-inline-end:6px; vertical-align:middle; background:#c0c0c0; border:0; box-shadow:inset -1px -1px 0 #404040, inset 1px 1px 0 #fff, inset -2px -2px 0 #808080, inset 2px 2px 0 #dfdfdf; }
  .w95ico::after { content:''; position:absolute; inset:-10px -8px; }   /* the hit area is 44px tall without making the row taller */
  .w95ico:active { box-shadow:inset 1px 1px 0 #404040, inset -1px -1px 0 #fff, inset 2px 2px 0 #808080; } .w95ico svg { width:18px; height:18px; display:block; }
  #card .fl { display:flex; flex-wrap:wrap; gap:6px; align-items:center; font-size:13px; padding:3px 0; } #card .fl a { font-weight:600; word-break:break-word; } #card .fl small { color:#667; } #card .btn.sm { padding:2px 8px; font-size:12px; }
  .miss { display:flex; flex-wrap:wrap; gap:4px; }
  .m { font-size:11px; border-radius:9px; padding:1px 7px; background:#fdecea; color:#8a2a1b; white-space:nowrap; }
  .m.pic { background:#eef0fb; color:#33408a; }
  .m.ap { background:#f6e3f0; color:#7a2459; }
  .pt { font-size:12px; line-height:1.3; }
  .pt .diff { color:#a1280d; font-weight:600; } .pt .same { color:#2b6a3a; } .pt .none { color:#667; font-style:italic; }
  .two { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:6px 0 8px; } .two > div { background:#f4f7f2; border-radius:10px; padding:8px 10px; } .two b { font-size:22px; display:block; } .two span { font-size:12px; color:#556; }
  .thumbs { display:flex; gap:8px; flex-wrap:wrap; margin:6px 0; } .th { width:84px; height:84px; border-radius:10px; background:linear-gradient(135deg,#bcd9b5,#7fae78); display:flex; align-items:center; justify-content:center; font-size:30px; position:relative; } .th small { position:absolute; bottom:2px; inset-inline:4px; font-size:9px; color:#134; text-align:center; }
  .toggles label { display:flex; gap:8px; align-items:center; font-size:13px; padding:3px 0; }
  .editlink { display:flex; gap:6px; flex-wrap:wrap; align-items:center; font-size:13px; margin-top:6px; } .editlink input { flex:1 1 200px; font:inherit; font-size:13px; border:1px solid #b9c4b8; border-radius:8px; padding:5px 8px; min-width:0; }

  #card .ch { position:sticky; top:0; background:var(--sh-card); z-index:2; padding:14px 16px 10px; border-bottom:1px solid var(--line); }
  #card .xw { position:sticky; top:0; height:0; z-index:3; } #card .ch .cst { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-bottom:6px; } #card .xw .x { position:absolute; inset-inline-start:10px; top:10px; border:0; background:#eef3ec; border-radius:50%; width:32px; height:32px; padding:0; font-size:16px; line-height:1; display:flex; align-items:center; justify-content:center; cursor:pointer; }
#card .ch .hdr-icons .act { flex-direction:column; align-items:flex-start; gap:4px; } #card .ch .hdr-icons .act-g { display:flex; flex-wrap:wrap; gap:2px; align-items:center; width:100%; } #card .ch .hdr-icons .act-g + .act-g { border-top:1px solid #dfe6dc; padding-top:4px; }
  #card .ch { padding-inline-start:56px; }
  #card .ch h3 { margin:0; font-size:20px; } #card .ch .sub2 { color:#566; font-size:13px; margin-top:2px; }
  #card section { padding:12px 16px; border-bottom:1px solid #eef1ec; }
  #card h4 { margin:0 0 8px; font-size:15px; display:flex; gap:8px; align-items:center; }
  .ph { font-size:11px; font-weight:600; border-radius:8px; padding:1px 7px; background:var(--sh-head2); color:#335b1f; } .ph.p2 { background:#e5eefa; color:#1f4f8f; }
  .kv { display:grid; grid-template-columns:auto 1fr; gap:4px 12px; font-size:13px; margin:0; } .kv dt { color:#667; } .kv dd { margin:0; }
  .note { background:#f7f9f5; border-radius:10px; padding:8px 10px; margin-bottom:6px; font-size:13px; }
  .note small { color:#778; display:block; margin-top:3px; }
  .lnk { display:flex; gap:8px; align-items:center; padding:6px 0; border-bottom:1px dashed #e3e8e0; font-size:13px; } .lnk small { color:#778; margin-inline-start:auto; }
  .add { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; } .add input, .add textarea, .add select { font:inherit; font-size:13px; border:1px solid #b9c4b8; border-radius:8px; padding:6px 8px; flex:1 1 140px; min-width:0; }
  .tl { border-inline-start:3px solid #cfe0cb; margin-inline-start:8px; padding-inline-start:14px; }
  .tl .ev { position:relative; padding:0 0 14px; font-size:13px; } .tl .ev::before { content:''; position:absolute; inset-inline-start:-21px; top:3px; width:11px; height:11px; border-radius:50%; background:var(--ok); border:2px solid #fff; }
  .tl .ev.todo::before { background:#c9d2c6; } .tl .ev b { display:block; font-size:13px; }
  .file { display:inline-flex; gap:6px; align-items:center; background:#eef3fa; border:1px solid #c9d9ef; border-radius:8px; padding:4px 9px; font-size:12px; margin-top:4px; }
  .out { display:inline-block; border-radius:10px; padding:2px 10px; font-size:12px; font-weight:700; background:#fff3d6; color:#7a5200; }
  .hist { font-size:12px; color:#667; margin:0; padding-inline-start:18px; }
  .rule { font-size:12px; background:#fff8e1; border:1px solid #f0dd9a; border-radius:8px; padding:6px 8px; margin-top:8px; color:#5c4a00; }
  .legend { font-size:12px; color:#586; margin:6px 0; }
.lic-loading { text-align:center; padding:40px 0; color:#556; }
.lic-note { font-size:13px; color:#4f5b53; }
.lic-warn { background:#fff8e1; border:1px solid #f0dd9a; border-radius:8px; padding:6px 10px; font-size:13px; color:#5c4a00; margin:8px 0; }
/* the old page's tools row, panels and prompt box (same look) */
.lic-app .cd-tools { display:flex; flex-wrap:wrap; gap:10px 16px; align-items:center; margin:10px 0 12px; }
.lic-app .note { color:#4f5b53; font-size:14px; margin:0; }
.export-btn { background:#2a8fbd; color:#fff; border:none; border-radius:10px; padding:10px 18px; font:inherit; font-size:14px; font-weight:500; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; min-height:36px; }
.cd-tools .export-btn { font-size:14px; padding:6px 12px; }
.export-btn:hover { background:#218cb8; }
.panel { background:var(--sh-card); padding:14px; border-radius:12px; margin-bottom:14px; border:1px solid var(--sh-line); }
.collapsible summary { cursor:pointer; margin:4px 0; } .collapsible summary h2 { display:inline; font-size:16px; margin:0; } .collapsible p { margin:8px 0; font-size:14px; line-height:1.5; }
.ai-prompt-field { width:100%; box-sizing:border-box; font-family:inherit; font-size:14px; padding:10px 12px; border:2px solid var(--sh-line); border-radius:10px; resize:vertical; margin-bottom:10px; background:var(--sh-card); color:inherit; }

/* card header (Ram 11-04): the icon row, the status chip and the take-care button together at the top of the card */
.act .lic-appeal-ic { display:inline; width:auto; max-width:none; margin:0; padding:0 3px; border:0; background:none; font-size:15px; font-weight:400; }
#card .ch .hdr-icons { margin-top:8px; } #card .ch .hdr-icons .act { display:flex; flex-wrap:wrap; gap:2px 2px; justify-content:flex-start; } #card .ch .hdr-icons .act a, #card .ch .hdr-icons .act span { font-size:19px; padding:0 3px; line-height:1.5; } #card .ch .hdr-icons .act a[title^="מבא"] { font-size:12px; }
#card .ch .hdr-row { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:8px; }
.pubhint { margin:2px 0 6px; font-size:12px; }

/* column filters + the city combo (Ram 11-04): a second sticky header row, every control small, popovers for multi-select, one combo component for every city picker */
.sheet thead tr:first-child th { box-shadow:none; border-bottom:1px solid #c9d6c4; }
.sheet thead th .sa { font-size:11px; }
.cf { font:inherit; font-size:12px; border:1px solid #b9c4b8; border-radius:6px; padding:3px 6px; background:var(--sh-card); color:inherit; width:100%; box-sizing:border-box; min-width:80px; }
.cf.n { min-width:0; width:50%; } .cr { display:flex; gap:3px; min-width:96px; }
.cf-clear { font:inherit; font-size:12px; border:1px solid #b9c4b8; border-radius:6px; padding:3px 8px; background:var(--sh-card); color:inherit; cursor:pointer; }
.cb { position:relative; min-width:120px; } .cb input { font:inherit; font-size:13px; border:1px solid #b9c4b8; border-radius:8px; padding:5px 26px 5px 8px; background:var(--sh-card); color:inherit; width:100%; box-sizing:border-box; }
.cb .cb-x { position:absolute; inset-inline-end:3px; top:50%; transform:translateY(-50%); border:0; background:none; cursor:pointer; font-size:12px; color:#667; padding:2px 4px; }
.cb-list { position:absolute; z-index:60; inset-inline-start:0; top:100%; margin:2px 0 0; padding:3px; list-style:none; min-width:100%; max-height:260px; overflow:auto; background:var(--sh-card); border:1px solid #9fb09b; border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.2); font-size:13px; }
.cb-list li { display:flex; justify-content:space-between; gap:10px; padding:5px 8px; border-radius:6px; cursor:pointer; white-space:nowrap; } .cb-list li i { font-style:normal; color:#6a7a6a; font-size:12px; } .cb-list li.act, .cb-list li:hover { background:var(--sh-hover); } .cb-list li.none { color:#778; cursor:default; }
.ms { position:relative; margin-bottom:3px; } .ms summary { list-style:none; cursor:pointer; font-size:12px; border:1px solid #b9c4b8; border-radius:6px; padding:3px 8px; background:var(--sh-card); white-space:nowrap; } .ms summary::-webkit-details-marker { display:none; }
.ms.on summary { background:var(--ok); color:#fff; border-color:var(--ok); }
.ms .msb { position:absolute; z-index:60; inset-inline-start:0; top:100%; margin-top:2px; min-width:210px; background:var(--sh-card); border:1px solid #9fb09b; border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.2); padding:6px 8px; font-size:13px; }
.ms .msb label { display:flex; gap:6px; align-items:center; padding:3px 0; white-space:nowrap; } .ms .msb label i { font-style:normal; color:#6a7a6a; font-size:12px; margin-inline-start:auto; } .ms .msb label.zero { opacity:.5; }
.fgroup .cb, .fgroup .cf { min-width:0; } .sheetm .cb-list { max-height:40vh; }
.sub .cb { flex:0 1 260px; }
.sheet .cf, .sheet .cb input { font-size:12px !important; padding:3px 6px; height:26px; border-radius:6px; line-height:1.2; min-height:0; }
.sheet .cb input { padding-inline-end:22px; } .sheet .cf.n { width:48%; } .sheet .cr { min-width:100px; } .sheet thead tr.filters th { vertical-align:top; }
.sheet .ms summary { height:20px; line-height:20px; padding:0 8px; }
.sheet thead th { height:auto; padding:5px 6px 6px; vertical-align:top; cursor:default; } .sheet thead th .hl { cursor:pointer; margin-bottom:4px; user-select:none; } .sheet thead th .hf { font-weight:400; min-width:84px; } .sheet thead th .hf .ms { display:block; }
.lic-app .cac, .sheet .cac, .sheetm .cac { width:100%; display:block; } .sub .cac { width:min(300px,100%); }
.sheet thead .cac-in { font-size:12px; min-height:26px; padding:3px 8px; border-radius:6px; } .sheet thead .cac-list { font-size:13px; } .sheet thead .cac-opt { min-height:34px; font-size:13px; }

.sw10 { display:inline-flex; align-items:center; gap:6px; cursor:pointer; padding:6px 10px; border:1px solid var(--line); border-radius:10px; background:var(--sh-card); font-size:14px; } .sw10 input { width:18px; height:18px; }
#printView { display:none; }
@media print { @page { size: 300pt 650pt; margin: 0; }
  body.printing > *:not(#printView) { display:none !important; } body.printing #printView { zoom:1 !important; display:block; direction:rtl; font-family:inherit; color:#1a2a22; -webkit-print-color-adjust:exact; print-color-adjust:exact; background:#fff; }
  body.printing #printView a { text-decoration:none; font-weight:600; color:#2d6a4f; }
  /* one licence per phone-shaped page, as the trees top-10 report (open_for_objection_top10, Ram 11-05) */
  body.printing #printView .pv-page { width:300pt; height:649pt; padding:20pt 18pt; box-sizing:border-box; overflow:hidden; display:flex; flex-direction:column; break-after:page; page-break-after:always; }
  body.printing #printView .pv-page:last-child { break-after:auto; page-break-after:auto; }
  body.printing #printView .pv-strap { font-size:7pt; color:#6b6f66; text-align:center; margin-bottom:8pt; }
  body.printing #printView .pv-badge { display:block; padding:7pt 9pt; border-radius:8pt; margin-bottom:10pt; font-size:11pt; font-weight:700; color:#fff; } body.printing #printView .pv-badge.u { background:#a1281c; } body.printing #printView .pv-badge.s { background:#c8650a; } body.printing #printView .pv-badge.n { background:#e8f0ea; color:#2d6a4f; }
  body.printing #printView .pv-title { font-size:17pt; font-weight:700; margin:0 0 2pt; line-height:1.2; } body.printing #printView .pv-sub { font-size:9pt; color:#6b6f66; margin-bottom:10pt; }
  body.printing #printView .pv-map { display:block; width:100%; aspect-ratio:16/9; border-radius:8pt; overflow:hidden; margin-bottom:10pt; }
  body.printing #printView .pv-count { border:1pt solid #d9dccf; border-radius:10pt; padding:9pt 10pt; margin-bottom:9pt; } body.printing #printView .pv-count b { display:block; font-size:22pt; line-height:1; } body.printing #printView .pv-count span { font-size:9pt; color:#6b6f66; }
  body.printing #printView .pv-kv { border:1pt solid #d9dccf; border-radius:10pt; overflow:hidden; margin-bottom:9pt; } body.printing #printView .pv-kv div { display:flex; padding:6pt 10pt; border-bottom:1pt solid #f0ede4; gap:8pt; font-size:9pt; } body.printing #printView .pv-kv div:last-child { border-bottom:0; } body.printing #printView .pv-kv i { font-style:normal; width:62pt; flex:none; color:#6b6f66; } body.printing #printView .pv-kv b { flex:1; font-weight:600; }
  body.printing #printView .pv-sp { font-size:9pt; line-height:1.6; margin-bottom:auto; } body.printing #printView .pv-sp span { color:#6b6f66; }
  body.printing #printView .pv-cta { display:flex; align-items:center; justify-content:center; padding:10pt; border-radius:9pt; background:#2d6a4f; color:#fff !important; font-size:11pt; font-weight:700; margin-top:8pt; } body.printing #printView .pv-cta.o { background:#fff; color:#2d6a4f !important; border:1pt solid #2d6a4f; }
  body.printing #printView .pv-links { display:flex; justify-content:center; gap:12pt; margin-top:6pt; font-size:8pt; } }
@media (max-width: 400px) { dialog#card .ch .hdr-row { gap:3px; } dialog#card .ch .hdr-row .take { padding:5px 6px; font-size:13px; } }
@media (max-width: 340px) { dialog#card .ch .hdr-row .take .em { display:none; } }

.adv { margin-top:8px; } .adv > summary { cursor:pointer; font-size:14px; font-weight:600; color:var(--ok); padding:6px 0; list-style:none; } .adv > summary::before { content:'▸ '; } .adv[open] > summary::before { content:'▾ '; } .adv .advn { color:#b36b00; } .deskf .adv .frow { margin-top:6px; } .sheetm .adv { margin-top:4px; }
/* stat tile labels: full on desktop, short on the phone row (Ram 11-05) */
.stat .sh { display:none; } .stat i { font-style:normal; }
/* one layout pass (Ram 11-04): info box + stat tiles in a narrow column at the far LEFT (the page is RTL: main first, aside second), nothing jumps when a filter is chosen */
.lic-wrap { display:flex; gap:16px; align-items:flex-start; } .lic-main { flex:1 1 auto; min-width:0; } .lic-side { flex:0 0 250px; width:250px; }
.lic-side .cards { display:grid; grid-template-columns:1fr; gap:8px; margin:8px 0 0; } .lic-side .cards .stat { width:100%; } .lic-side .panel.explain { margin:0; }
.lic-wrap { flex-direction:column; align-items:stretch; } .lic-side { order:-1; flex:none; width:auto; } .lic-side .cards .stat .lg { display:none; } .lic-side .cards .stat .sh { display:inline; } .lic-side .cards { display:grid; width:100%; box-sizing:border-box; grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:minmax(60px,1fr); gap:4px; overflow-x:auto; margin:0 0 8px; order:-1; } .lic-side .cards .stat { min-width:0; width:auto; padding:6px 3px; text-align:center; border-radius:10px; } .lic-side .cards .stat b { font-size:17px; line-height:1.2; } .lic-side .cards .stat span { display:block; font-size:10px; line-height:1.25; white-space:nowrap; }   /* the page runs at zoom 1.3: 17px / 10px draw as ~22px / 13px */
@media (min-width: 1000px) { .lic-side .cards .stat .lg { display:inline; } .lic-side .cards .stat .sh { display:none; } }
@media (min-width: 760px) { .lic-side .cards .stat b { font-size:28px; } .lic-side .cards .stat span { font-size:13px; } .lic-side .cards .stat { padding:8px 12px; } .lic-side .cards { gap:8px; grid-auto-columns:minmax(110px,1fr); } }
.lic-side { display:flex; flex-direction:column; }

.fbar .chips { min-height:36px; } .fbar .count { min-height:22px; } .adv .advbody { min-height:0; } .adv .seg { min-height:34px; align-content:flex-start; } .fbar { overflow-anchor:none; }
.deskf .adv .advbody { align-items:flex-start; } .deskf .adv .fgroup { min-width:0; } .deskf .adv .cf { max-width:180px; }
.deskf .adv .advbody { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:10px 18px; align-items:start; } .deskf .adv .advbody .fgroup { min-width:0; } .deskf .adv .advbody .seg { flex-wrap:wrap; }

/* search box: the alert signup for the matched city sits INSIDE the box (no layout jump), shown after a pause (Ram 11-05) */
.qwrap { position:relative; display:block; flex:1 1 auto; min-width:0; } .qwrap input[type=search] { width:100%; box-sizing:border-box; }
.qwrap .qsub { display:none; position:absolute; inset-inline-end:34px; top:50%; transform:translateY(-50%); max-width:55%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:inherit; font-size:13px; padding:3px 10px; border-radius:999px; border:1px solid var(--ok); background:#e8f3e8; color:#1b5e20; cursor:pointer; }
.qwrap.has-sub .qsub { display:block; } .qwrap.has-sub input[type=search] { padding-inline-end:46%; }
.chip-x.back { background:#fff7e0; border-color:#e0b84a; }
@media (max-width: 700px) { .qwrap .qsub .qc { display:none; } .qwrap .qsub { max-width:none; font-size:12px; padding:2px 7px; inset-inline-end:30px; } .qwrap.has-sub input[type=search] { padding-inline-end:104px; } }
@media (max-width: 420px) { .qwrap .qsub .qt { display:none; } .qwrap.has-sub input[type=search] { padding-inline-end:70px; } }
.qwrap .qsub::after { content:''; position:absolute; inset:-8px -6px; }   /* tap target >= 44px without changing how it looks */
/* licence card (Ram 11-05): the icon groups are three rows - info, share, action - each on its own soft pastel */
#card .ch .hdr-icons .act { flex-direction:column; align-items:stretch; } #card .ch .hdr-icons .act-g { display:flex; flex-wrap:wrap; width:100%; box-sizing:border-box; border-radius:10px; padding:3px 8px; } #card .ch .hdr-icons .act-g + .act-g { border-top:0; padding-top:3px; margin-top:2px; }
#card .ch .hdr-icons .act-g.g-info { background:#e7f0fb; } #card .ch .hdr-icons .act-g.g-share { background:#e6f5ea; } #card .ch .hdr-icons .act-g.g-do { background:#fdeedd; }
#card .ch .hdr-icons, #card .ch .hdr-icons .act { width:100%; box-sizing:border-box; } #card .ch .hdr-icons .act { display:flex; }

/* WIDE CARD on a computer (Ram 11-05, mockup approved): the card is as wide as the table area, centred, with the page visible on ALL four sides (a margin of 3vw, about half of what the mockup showed on the right);
   two columns of sections; the header puts the pill row + the three icon rows beside the title. A phone keeps the full-width sheet (the rule at max-width 900). */
@media (min-width: 901px) {
  #card, :root[dir="rtl"] #card { --cm: calc(3vw / var(--a11y-zoom,1.3)); inset-block:var(--cm); inset-inline:var(--cm); width:auto; height:auto; max-height:none; border-radius:16px; }
  dialog#card .ch { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,430px); gap:4px 24px; align-items:start; }
  dialog#card .ch .cst, dialog#card .ch h3, dialog#card .ch .sub2 { grid-column:1; }
  dialog#card .ch #cB { grid-column:2; grid-row:1 / span 3; margin-top:0; }
  #card #cBody { column-count:2; column-gap:0; column-rule:1px solid #eef1ec; }
  #card #cBody > section { break-inside:avoid; }
}

.locsec .loctabs { display:flex; gap:4px; margin-bottom:0; } .locsec .loctabs button { flex:1; font:inherit; font-size:14px; padding:7px 10px; border:1px solid #b9c4b8; border-bottom:0; border-radius:8px 8px 0 0; background:#e3e8e3; cursor:pointer; } .locsec .loctabs button.on { background:#2e7d46; color:#fff; border-color:#2e7d46; }
.locsec .locmap { height:260px; border:1px solid #b9c4b8; border-radius:0 0 10px 10px; background:#e6ebe3; } .locsec .locnote { font-size:13px; margin-top:6px; } .locsec .loccredit { font-size:11px; color:#667; margin-top:3px; } .locsec .loclink { margin-top:4px; font-size:13px; }
.locsec .loctrees { display:inline-flex; gap:5px; align-items:center; font-size:13px; margin-top:6px; } .locsec .locnote:empty { display:none; }
.act-lbl { display:none; }
#card .ch .hdr-icons .act-lbl { display:inline-block; font-size:12px; font-weight:700; color:#33414f; margin-inline-end:8px; white-space:nowrap; }

.mfilter .who { flex:0 0 auto; font-size:12px; } .mfilter .who .btn { padding:6px 8px; font-size:12px; white-space:nowrap; }
.mfilter .who .gg { display:none; }

/* licence card header, less tall + never see-through (Ram 11-09): on a wide screen the three action rows (לחקור / להפיץ / לפעול) sit in the empty middle beside the title and the meta line, the pills stay on the right with the buttons on the left of the same line; the header is opaque and above every Leaflet pane while the card scrolls under it */
#card .ch { z-index:1200; background:#fff; background:var(--sh-card, #fff); }
#card .xw { z-index:1201; }
@media (min-width: 901px) {
  #card .ch { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:18px; align-items:start; }
  #card .ch .cst { grid-column:1; grid-row:1; margin-bottom:2px; }
  #card .ch #cB { display:contents; }
  #card .ch .hdr-row { grid-column:2; grid-row:1; margin:0; justify-self:end; }
  #card .ch h3 { grid-column:1; grid-row:2; }
  #card .ch .sub2 { grid-column:1; grid-row:3; }
  #card .ch .hdr-icons { grid-column:2; grid-row:2 / span 2; margin:4px 0 0; width:auto; min-width:0; }
  #card .ch .hdr-icons .act { flex-direction:row; flex-wrap:nowrap; align-items:stretch; gap:6px; } #card .ch .hdr-icons .act-g { width:auto; flex:0 0 auto; flex-wrap:nowrap; padding:2px 8px; } #card .ch .hdr-icons .act-g + .act-g { border-top:0; padding-top:2px; }
  #card .ch { padding-top:10px; padding-bottom:8px; }
}

/* the Word form (טופס ב׳) download sits in the band under the map credit, opposite the GovMap link (Ram 11-09) */
#card .loclink { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 14px; margin-top:6px; }
#card .loclink > a { margin-inline-end:12px; } #card .loclink .locword { margin-inline-start:auto; font:inherit; font-size:13px; min-height:44px; padding:0 12px; border:1.5px solid #2c7a4b; border-radius:10px; background:#eef7f0; color:#1d5a37; cursor:pointer; }

/* the map's loading mark (Ram 11-09): covers the map area until its first tiles are drawn */
#card .locsec { position:relative; }
#card .maploading { position:absolute; z-index:1100; display:flex; align-items:center; justify-content:center; gap:10px; background:rgba(238,243,236,.92); border-radius:0 0 10px 10px; font-size:14px; color:#234; }
#card .maploading .spin { width:22px; height:22px; border:3px solid #b9c9b4; border-top-color:#2c7a4b; border-radius:50%; animation:locspin .9s linear infinite; }
@keyframes locspin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #card .maploading .spin { animation:none; } }

/* embed mode (/licences/?embed=1): the page in a frame - no chrome, neutral background, a small credit (src/licences.js) */
body.embed { background: transparent; }
body.embed header.site, body.embed footer.site-legal, body.embed #themePick, body.embed .gi-cats, body.embed #loginBtn, body.embed #who, body.embed #who2, body.embed .loginBtn, body.embed [data-mast-src] { display: none !important; }
body.embed .lic-embed-credit { text-align: center; font-size: .8rem; margin: .8rem 0 .4rem; opacity: .85; }
body.embed .lic-embed-credit a { color: inherit; }

  /* EMBED THEME rehovot (Ram 11-16): tokens read from the host site's own look (dark teal page, olive + cream, orange call to action), not copied from it. Only inside the frame (body.embed) and only with &theme=rehovot. */
  :root[data-theme="rehovot"] { --bg:#274c59; --fg:#f4f1d2; --accent:#afc03c; --muted:#cfd8d4; --ink:#10304a; --line:rgba(244,241,210,.28);
    --sh-card:#fbfaee; --sh-row2:#f5f3dd; --sh-hover:#eef0c8; --sh-head:#e6e9b4; --sh-head2:#d9de9a; --sh-line:#cfd3b0; --ok:#2e7d46; --ok-bg:#e3f0d8; --warn:#9a4a08; --warn-bg:#fbeacf; --info:#1f5f7a; --info-bg:#dcecf3; }
  :root[data-theme="rehovot"] body.embed { background:var(--bg); color:var(--fg); font-family:var(--embed-font,'Open Sans','Noto Sans Hebrew',Arial,sans-serif); }
  :root[data-theme="rehovot"] body.embed a { color:#a3c9e8; }
  :root[data-theme="rehovot"] body.embed .stat, :root[data-theme="rehovot"] body.embed .panel, :root[data-theme="rehovot"] body.embed .lic-app .note, :root[data-theme="rehovot"] body.embed .fbar, :root[data-theme="rehovot"] body.embed .sheetwrap, :root[data-theme="rehovot"] body.embed .lic,
  :root[data-theme="rehovot"] body.embed .tools button, :root[data-theme="rehovot"] body.embed input, :root[data-theme="rehovot"] body.embed select, :root[data-theme="rehovot"] body.embed textarea { color:var(--ink); }
  :root[data-theme="rehovot"] body.embed .stat a, :root[data-theme="rehovot"] body.embed .panel a, :root[data-theme="rehovot"] body.embed .lic-app .note a, :root[data-theme="rehovot"] body.embed .fbar a, :root[data-theme="rehovot"] body.embed .sheetwrap a, :root[data-theme="rehovot"] body.embed .lic a { color:#1f5f7a; }
  :root[data-theme="rehovot"] body.embed .stat b, :root[data-theme="rehovot"] body.embed .stat .n { color:var(--ink); }
  :root[data-theme="rehovot"] body.embed button.primary, :root[data-theme="rehovot"] body.embed .btn-primary { background:#da8e04; color:#10304a; border-color:#da8e04; border-radius:22px; }
  :root[data-theme="rehovot"] body.embed .lic-embed-credit, :root[data-theme="rehovot"] body.embed .lic-embed-credit a { color:var(--fg); }

/* Documents attached to a licence, shown as part of it (Ram 11-18). The converter writes only p / h2-h4 / ul / li / table / strong / em / br / img / figure. */
.lf-doc { margin: .6rem 0 1rem; padding: .7rem .9rem; border: 1px solid var(--border, #d9d9e3); border-radius: 12px; background: var(--card, transparent); }
.lf-doc h5 { margin: 0 0 .4rem; font-size: 1.02rem; }
.lf-body { line-height: 1.7; overflow-wrap: anywhere; }
.lf-body p { margin: .45em 0; }
.lf-body h2, .lf-body h3, .lf-body h4 { margin: .9em 0 .3em; line-height: 1.3; }
.lf-body ul { margin: .4em 0; padding-inline-start: 1.3rem; }
.lf-body .lf-tbl { overflow-x: auto; margin: .6em 0; }
.lf-body table { border-collapse: collapse; min-width: 60%; }
.lf-body td, .lf-body th { border: 1px solid var(--border, #d9d9e3); padding: .3rem .5rem; text-align: start; vertical-align: top; }
.lf-body img, .lf-body figure img { max-width: 100%; height: auto; display: block; margin: .5rem auto; }
.lf-body figure { margin: .6rem 0; }
.lf-prev { margin-top: .5rem; padding-top: .5rem; border-top: 1px dashed var(--border, #d9d9e3); }
@media print { .lf-doc { break-inside: avoid-page; border: 0; padding: 0; } }
.lf-st { color: var(--muted, #667); margin-inline-start: .3rem; }
.lf-edit { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0; }
.lf-edit input { flex: 1 1 12rem; min-width: 0; }
.lf-omit { color: var(--muted, #667); font-style: italic; }
.lf-views { margin: .2rem 0 .5rem; }
.lf-views [aria-pressed="true"] { font-weight: 700; text-decoration: underline; }
.lf-body td, .lf-body th { min-width: 4.5rem; }
.lf-body .lf-tbl .lf-tbl { margin: 0; }
.lf-body table table { min-width: 0; border: 0; }
.lf-body table { width: 100%; }

.od-tag { display: inline-block; padding: .05rem .6rem; border: 1px solid; border-radius: 999px; font-size: .78rem; white-space: nowrap; }
.od-tag.ok { color: #146c2e; background: #e6f4ea; border-color: #146c2e; }
.od-tag.wait { color: #555; background: #eee; border-color: #777; }
.doc-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 .8rem; }
.doc-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem 1rem; border: 1px solid #2d6a4f; border-radius: 9px; background: #2d6a4f; color: #fff !important; font-weight: 700; text-decoration: none; }
.doc-btn.o { background: transparent; color: #2d6a4f !important; }
