:root {
  --green: #17503a; --green-2: #23755a; --green-3: #3f9b63; --green-soft: #e6f1ea;
  --bg: #f2f3ee; --card: #ffffff; --line: #e2e5dc; --line-2: #eef0e9;
  --text: #16221b; --muted: #67736b;
  --red: #b8432f; --red-soft: #f9e9e4; --amber: #a2680f; --amber-soft: #fbf1dc; --blue: #2a6494; --blue-soft: #e4eef7;
  --clay: #c2694f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 40, 30, .05), 0 6px 20px rgba(22, 40, 30, .05);
}
* { box-sizing: border-box; }
html { height: 100%; }
body { margin: 0; min-height: 100vh; }
body { font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; display: flex; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 600; }
.num { white-space: nowrap; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
[hidden] { display: none !important; }

/* ---------- navigation ---------- */
.nav { width: 224px; background: #123d2c; color: #fff; padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; flex-shrink: 0; }
.nav .brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; padding: 4px 8px 22px; }
.nav .brand i { font-size: 20px; width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; }
.nav a { display: flex; align-items: center; gap: 12px; color: #c4d8cc; text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 500; transition: background .15s, color .15s; }
.nav a i { font-size: 20px; }
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a.on { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset -3px 0 0 #8fd0a8; }

main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px 12px; gap: 12px; }
.top h1 { font-size: 22px; letter-spacing: -.2px; }
.year { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
#view { padding: 0 28px 32px; max-width: 1500px; width: 100%; }
#view > * { animation: fade .22s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- controls ---------- */
select, input, textarea, button { font: inherit; color: inherit; }
select, input, textarea { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; min-height: 40px; width: 100%; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 64px; resize: vertical; }
.year select, .filters select, .filters input { width: auto; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(35, 117, 90, .16); }
button, .btn { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 14px; min-height: 40px; cursor: pointer; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; color: var(--text); transition: background .15s, border-color .15s, transform .05s; }
button:hover, .btn:hover { background: #f6f7f2; border-color: #d3d8cb; }
button:active { transform: scale(.98); }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--green-2); outline-offset: 2px; }
button.primary { background: var(--green); border-color: var(--green); color: #fff; }
button.primary:hover { background: var(--green-2); border-color: var(--green-2); }
button.danger { color: var(--red); border-color: #e9cbc3; }
button.icon { padding: 6px 8px; min-height: 34px; border-color: transparent; background: transparent; }
button.icon:hover { background: var(--green-soft); }
.mini { min-height: 30px; padding: 2px 10px; font-size: 13px; }

/* ---------- shared blocks ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { min-width: 0; }
.kpi, .panel, .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.kpi { padding: 14px 16px; }
.kpi .l { font-size: 13px; color: var(--muted); }
.kpi .v { font-size: 24px; font-weight: 600; }
.kpi .s { font-size: 12px; color: var(--muted); }
.panel { padding: 18px; margin-bottom: 16px; }
.panel h2, .card h2 { font-size: 16px; margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; }
.hbar { display: grid; grid-template-columns: 130px 1fr 90px; gap: 8px; align-items: center; font-size: 13px; padding: 4px 0; }
.hbar .t { background: var(--line-2); border-radius: 6px; height: 10px; overflow: hidden; }
.hbar .t div { background: var(--green-2); height: 100%; border-radius: 6px; }
.hbar .n { text-align: left; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters .grow { flex: 1; min-width: 160px; }
.filters .grow input { width: 100%; }
.sum { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.sum b { color: var(--text); }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tbl th { background: #f4f5f0; text-align: right; font-size: 12px; color: var(--muted); padding: 9px 12px; font-weight: 500; white-space: nowrap; }
.tbl td { padding: 9px 12px; border-top: 1px solid var(--line-2); vertical-align: top; font-size: 14px; }
.tbl td.n, .tbl th.n { text-align: left; white-space: nowrap; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: #f8f9f5; }
.tbl tfoot td { font-weight: 600; background: #f7f8f3; }
.tag { display: inline-block; font-size: 11px; padding: 1px 9px; border-radius: 20px; background: var(--green-soft); color: var(--green); white-space: nowrap; font-weight: 500; }
.tag.cap { background: var(--blue-soft); color: var(--blue); } .tag.warn { background: var(--amber-soft); color: var(--amber); } .tag.red { background: var(--red-soft); color: var(--red); }
.sub { font-size: 12px; color: var(--muted); }
.wrap { overflow-x: auto; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 6px; }
.show-m { display: none; }

/* ---------- maps ---------- */
#map { height: calc(100vh - 150px); min-height: 420px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 0; }
#map.short { height: 440px; min-height: 0; }
.maplay { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.blabel-wrap { width: 0 !important; height: 0 !important; background: none; border: 0; }
.blabel { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none; color: #fff; font-weight: 600; font-size: 12px; line-height: 1; text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 1px #000; font-family: 'IBM Plex Sans Arabic', sans-serif; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; margin: 8px 0 12px; }
.kv span:nth-child(odd) { color: var(--muted); }

/* ---------- dialog ---------- */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(520px, 94vw); max-height: 92vh; box-shadow: 0 24px 60px rgba(10, 25, 18, .3); }
dialog[open] { animation: pop .18s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
dialog::backdrop { background: rgba(16, 28, 22, .45); backdrop-filter: blur(2px); }
#dlgForm { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
#dlgForm h2 { font-size: 18px; }
.fr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.f label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 3px; }
.calc { background: var(--green-soft); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.acts { display: flex; gap: 8px; justify-content: space-between; margin-top: 6px; flex-wrap: wrap; }
.err { color: var(--red); font-size: 13px; min-height: 18px; }
#toast { position: fixed; bottom: 84px; left: 50%; transform: translate(-50%, 8px); background: #16221b; color: #fff; padding: 9px 18px; border-radius: 22px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 2000; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- irrigation and operations ---------- */
.wkhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.wkhead h2 { margin: 0; }
.wkhead .nav2 { display: flex; gap: 6px; align-items: center; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { border: 1px solid var(--line); border-radius: 10px; padding: 6px; min-height: 120px; background: #fafbf7; display: flex; flex-direction: column; gap: 5px; }
.day.today { border-color: var(--green-2); background: var(--green-soft); }
.day .dh { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); gap: 4px; }
.day .dh b { color: var(--text); }
.day .dh .over { color: var(--red); font-weight: 600; }
.day .add { border: 1px dashed var(--line); background: transparent; min-height: 26px; padding: 0; justify-content: center; color: var(--muted); margin-top: auto; }
.chip { display: block; width: 100%; text-align: right; border: 1px solid var(--c); border-inline-start-width: 4px; background: #fff; border-radius: 8px; padding: 4px 6px; font-size: 12px; line-height: 1.45; min-height: 0; font-weight: 400; }
.chip b { color: var(--c); }
.chip.done { background: color-mix(in srgb, var(--c) 14%, #fff); }
.chip.plan { border-style: dashed; border-inline-start-style: solid; background: transparent; }
.chip.late { border-color: var(--red); background: var(--red-soft); }
.prow { display: grid; grid-template-columns: minmax(70px, 1fr) 64px 64px 140px; gap: 6px; align-items: center; font-size: 13px; padding: 3px 0; }
.prow input { min-height: 34px; padding: 4px 6px; }
.prow.head { color: var(--muted); font-size: 12px; }
.prow.all { background: var(--green-soft); border-radius: 10px; padding: 6px; font-weight: 500; }
.pscroll { max-height: 42vh; overflow: auto; padding-inline-end: 4px; }
.bchk { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 4px; max-height: 150px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.bchk label { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text); margin: 0; }
.bchk input { width: auto; min-height: 0; }
.trow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.trow:first-of-type { border-top: 0; }

/* ---------- home ---------- */
.h-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.h-date { font-size: 14px; color: var(--muted); }
.h-fresh { font-size: 13px; margin-top: 2px; }
.h-fresh.stale { color: var(--amber); }
.h-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.h-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 16px; margin-bottom: 16px; }
.h-map { position: relative; overflow: hidden; min-height: 540px; }
#map.home { position: absolute; inset: 0; height: auto; min-height: 0; border: 0; border-radius: 0; }
.h-over { position: absolute; z-index: 500; }
.seg { display: inline-flex; background: rgba(255, 255, 255, .94); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; box-shadow: var(--shadow); }
.seg button { border: 0; background: transparent; min-height: 30px; padding: 2px 12px; font-size: 13px; border-radius: 8px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--green); color: #fff; }
.seg.flat { box-shadow: none; background: var(--line-2); border-color: transparent; }
.seg.flat button[aria-pressed="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.h-layer { top: 12px; right: 12px; }
.h-leg { bottom: 12px; right: 12px; background: rgba(255, 255, 255, .94); border-radius: 10px; padding: 6px 10px; font-size: 12px; display: flex; gap: 12px; flex-wrap: wrap; max-width: calc(100% - 24px); box-shadow: var(--shadow); }
.h-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; }
.h-basin button { white-space: nowrap; }
.h-basin { top: 12px; left: 12px; width: min(300px, calc(100% - 24px)); background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(10, 25, 18, .25); animation: pop .16s ease both; }
.h-basin h3 { font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.h-basin .kv { font-size: 13px; margin: 6px 0 10px; }
.h-irr { padding: 18px; display: flex; flex-direction: column; }
.h-cardhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.h-cardhead h2 { margin: 0; }
.h-cardhead a { font-size: 13px; color: var(--green-2); text-decoration: none; font-weight: 500; }
.h-cardhead a:hover { text-decoration: underline; }
.stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--line-2); gap: 2px; }
.stack div { min-width: 4px; }
.h-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0 6px; }
.h-stats div { text-align: center; }
.h-stats b { display: block; font-size: 22px; font-weight: 600; line-height: 1.2; }
.h-stats span { font-size: 12px; color: var(--muted); }
.h-list { margin-top: 8px; border-top: 1px solid var(--line-2); padding-top: 4px; flex: 1; }
.h-empty { text-align: center; padding: 18px 8px; color: var(--muted); font-size: 14px; }
.h-empty i { font-size: 30px; color: var(--green-3); display: block; margin-bottom: 4px; }
.h-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 12px; }
.kpi2 { padding: 16px 18px 12px; position: relative; overflow: hidden; }
.kpi2 .k-l { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi2 .k-l i { font-size: 17px; color: var(--green-2); }
.kpi2 .k-v { font-size: 27px; font-weight: 600; letter-spacing: -.3px; line-height: 1.35; }
.kpi2 .k-v small { font-size: 13px; font-weight: 400; color: var(--muted); margin-inline-start: 4px; }
.kpi2 .k-s { font-size: 12px; color: var(--muted); }
.kpi2 svg { display: block; width: 100%; height: 34px; margin-top: 8px; }
.kpi2.neg .k-v { color: var(--red); } .kpi2.pos .k-v { color: var(--green); }
.h-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.h-strip div { background: #fbfcf9; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.h-strip b { color: var(--text); font-size: 15px; font-weight: 600; }
.h-mid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.h-mid .card, .h-bot .card { padding: 18px; }
.cwrap { overflow-x: auto; }
.cin { position: relative; }
.cwrap svg { display: block; width: 100%; height: auto; }
.cwrap .cg rect.hit { fill: transparent; }
.cwrap .cg:hover rect.hit { fill: rgba(22, 40, 30, .05); }
.ctip { position: absolute; top: 0; transform: translateX(-50%); background: #16221b; color: #fff; border-radius: 10px; padding: 8px 12px; font-size: 12px; pointer-events: none; white-space: nowrap; line-height: 1.7; z-index: 5; }
.ctip b { font-size: 13px; }
.brow { display: grid; grid-template-columns: minmax(90px, 130px) 1fr auto; gap: 10px; align-items: center; padding: 7px 6px; border-radius: 8px; cursor: pointer; font-size: 13.5px; width: 100%; border: 0; background: transparent; min-height: 0; font-weight: 400; text-align: right; }
.brow:hover { background: #f4f6f0; }
.brow .t { background: var(--line-2); border-radius: 6px; height: 8px; overflow: hidden; }
.brow .t div { height: 100%; border-radius: 6px; background: var(--green-2); }
.brow .a { text-align: left; }
.brow .a small { color: var(--muted); margin-inline-start: 6px; }
.h-bot { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.feed { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-top: 1px solid var(--line-2); width: 100%; border-inline: 0; border-bottom: 0; background: transparent; border-radius: 0; min-height: 0; font-weight: 400; text-align: right; }
.feed:first-of-type { border-top: 0; }
.feed:hover { background: #f8f9f5; }
.feed .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: var(--red-soft); color: var(--red); }
.feed .ic.in { background: var(--green-soft); color: var(--green-2); }
.feed .ic.fund { background: var(--blue-soft); color: var(--blue); }
.feed .tt { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .am { font-weight: 600; font-size: 14px; }
.feed .am.in { color: var(--green-2); }
.krow { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.krow:first-of-type { border-top: 0; }
.krow span:first-child { color: var(--muted); }
.krow.total { font-weight: 600; }
.krow.total span:first-child { color: var(--text); }

@media (max-width: 1100px) {
  .h-top, .h-mid { grid-template-columns: minmax(0, 1fr); }
  .h-bot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .h-bot > :first-child { grid-column: 1 / -1; }
  .h-kpis, .h-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-map { min-height: 460px; }
}
@media (max-width: 860px) {
  body { flex-direction: column; }
  .nav { position: fixed; bottom: 0; top: auto; right: 0; left: 0; width: auto; height: auto; flex-direction: row; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); z-index: 1000; justify-content: space-around; box-shadow: 0 -4px 16px rgba(0, 0, 0, .12); }
  .nav .brand { display: none; }
  .nav a { flex-direction: column; gap: 0; font-size: 11px; padding: 6px 4px; flex: 1; text-align: center; }
  .nav a.on { box-shadow: none; }
  .nav a.hide-m { display: none; }
  main { padding-bottom: 76px; }
  .top { padding: 14px 14px 10px; } #view { padding: 0 12px 20px; }
  .maplay { grid-template-columns: 1fr; }
  #map { height: 56vh; }
  #map.short { height: 46vh; }
  .hide-m { display: none; }
  .show-m { display: block; }
  .tbl th, .tbl td { padding: 7px 6px; font-size: 13px; }
  .panel { padding: 14px; }
  .hbar { grid-template-columns: 100px 1fr 80px; }
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .h-map { min-height: 400px; }
  .h-kpis, .h-strip { gap: 10px; }
  .h-strip div { flex-direction: column; gap: 0; padding: 8px 12px; }
  .cin { min-width: 560px; }
  .kpi2 { padding: 12px 12px 8px; }
  .kpi2 .k-v { font-size: 20px; }
  .h-bot { grid-template-columns: minmax(0, 1fr); }
  .h-actions { width: 100%; }
  .h-actions button { flex: 1; justify-content: center; padding: 8px 6px; }
  .h-basin { top: auto; bottom: 12px; left: 12px; }
  .h-leg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- cloud sync and login ---------- */
.topr { display: flex; align-items: center; gap: 10px; }
.sync { min-height: 32px; padding: 3px 11px; border-radius: 20px; font-size: 12.5px; gap: 6px; background: var(--green-soft); border-color: transparent; color: var(--green); max-width: 260px; }
.sync span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync i { font-size: 16px; }
.sync.busy { background: var(--blue-soft); color: var(--blue); }
.sync.off { background: var(--amber-soft); color: var(--amber); }
.sync.bad { background: var(--red-soft); color: var(--red); }
.sync.busy i { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
body.locked .nav, body.locked main { display: none; }
#auth { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, #123d2c 0%, #1e5a40 55%, #2f7d55 100%); z-index: 3000; }
.auth-card { width: min(400px, 100%); background: #fff; border-radius: 18px; padding: 28px 26px; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); animation: pop .2s ease both; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; color: var(--green); margin-bottom: 18px; }
.auth-brand i { font-size: 22px; width: 40px; height: 40px; border-radius: 12px; background: var(--green-soft); display: grid; place-items: center; }
#authForm { display: flex; flex-direction: column; gap: 12px; }
#authForm h2 { font-size: 19px; }
#authForm button { justify-content: center; min-height: 44px; }
#authForm button:disabled { opacity: .6; cursor: wait; }
@media (max-width: 860px) {
  .sync span { display: none; }
  .sync { padding: 3px 9px; }
}

/* ---------- company name ---------- */
.bn { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.bn b { font-weight: 600; }
.bn small { font-size: 11px; font-weight: 400; opacity: .75; letter-spacing: .2px; text-align: right; }
.nav .brand { align-items: flex-start; font-size: 15px; }
.nav .brand i { flex-shrink: 0; }
.auth-brand { align-items: center; font-size: 17px; }
.auth-brand .bn small { color: var(--muted); opacity: 1; }

/* ---------- profile and account ---------- */
.av { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 600; flex-shrink: 0; letter-spacing: 0; }
.me { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); padding: 3px 4px 3px 12px; border-radius: 24px; border: 1px solid var(--line); background: #fff; transition: background .15s; }
.me:hover { background: #f6f7f2; }
.me .nm { display: flex; flex-direction: column; line-height: 1.25; }
.me .nm b { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.me .nm small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.h-hello { font-size: 20px; font-weight: 600; color: var(--text); }
.acc-head { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 16px; }
.acc-head h2 { font-size: 20px; margin: 0 0 2px; }
.pform { display: flex; flex-direction: column; gap: 10px; }
.pform input:disabled { background: #f4f5f0; color: var(--muted); }
.mrow { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.mrow:first-of-type { border-top: 0; }
.who { color: var(--green-2); white-space: nowrap; }
.who i { font-size: 12px; margin-inline-end: 2px; }
@media (max-width: 860px) {
  .me { padding: 2px; border: 0; background: transparent; }
  .me .nm { display: none; }
  .h-hello { font-size: 18px; }
}

.linkbtn { border: 0; background: transparent; color: var(--green-2); min-height: 32px; font-size: 14px; font-weight: 500; justify-content: center; padding: 4px; }
.linkbtn:hover { background: transparent; text-decoration: underline; }
#authForm .linkbtn { min-height: 32px; }
.nolabels .blabel { display: none; }

/* ---------- basin card actions ---------- */
.bact { display: flex; flex-wrap: wrap; gap: 6px; }
.bact .mini { flex: 1 1 auto; justify-content: center; }
.btag { color: var(--blue); white-space: nowrap; }
.btag i { font-size: 12px; margin-inline-end: 2px; }

/* ---------- satellite imagery switch ---------- */
.imgsw { display: inline-flex; background: rgba(255, 255, 255, .95); border-radius: 10px; padding: 3px; gap: 2px; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); font-family: inherit; }
.imgsw button { border: 0; background: transparent; min-height: 28px; padding: 2px 10px; font-size: 12px; border-radius: 8px; color: var(--muted); gap: 4px; white-space: nowrap; }
.imgsw button[aria-pressed="true"] { background: var(--green); color: #fff; }
.imagery-recent path.leaflet-interactive { fill-opacity: .3; }
.home .imgsw, .h-map .imgsw { margin-bottom: 12px; }
/* على الصورة الحديثة: الأحواض بلا حالة شفافة تقريبا لتظهر المحاصيل الحقيقية */
.imagery-recent path.leaflet-interactive[fill="#9aa39c"] { fill-opacity: .04; }
