/* وصل · مناطق التشغيل — تنسيق خاص بالصفحة فوق prototype/styles.css */
.z-shell {
  box-sizing: border-box;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 20px clamp(12px, 2vw, 28px) 48px;
}
.z-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.z-banner {
  background: var(--soft);
  border: 1px solid #f0c4ac;
  border-right: 6px solid var(--orange);
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 700;
  margin-bottom: 14px;
}
.z-banner small {
  display: block;
  font-weight: 400;
  margin-top: 4px;
}
.z-mock {
  background: #fbf4cd;
  border-color: #e4d38a;
  border-right-color: #a8802a;
}
.z-login {
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
}
.z-alert {
  color: var(--red);
  font-weight: 600;
  min-height: 1.6em;
  margin: 10px 0;
}
.z-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.z-stat {
  display: grid;
  gap: 2px;
  padding: 4px 12px;
  border-inline-start: 1px solid var(--line);
  min-width: 110px;
}
.z-stat:first-child {
  border-inline-start: 0;
}
.z-stat-k {
  font-size: 12px;
  color: var(--muted);
}
.z-stat-v {
  font-weight: 700;
  font-size: 15px;
}
.z-num {
  direction: ltr;
  unicode-bidi: isolate;
}
.z-grid {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.z-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 14px;
}
.z-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.z-tools button {
  flex: 1 1 46%;
  border: 1px solid var(--line);
  background: var(--card);
  font-weight: 600;
  font-size: 14px;
}
.z-tools button[aria-pressed="true"] {
  background: var(--soft);
  border-color: #f0c4ac;
  color: var(--action);
}
.z-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 34vh;
  overflow: auto;
}
.z-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: start;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 8px 10px;
}
.z-item-btn.is-selected {
  border-color: var(--orange);
  background: var(--soft);
}
.z-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid #0002;
}
.z-item-name {
  font-weight: 600;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.z-item-code {
  font-size: 11px;
  color: var(--muted);
  direction: ltr;
  unicode-bidi: isolate;
}
.z-chip {
  font-size: 11px;
  font-weight: 700;
  border-radius: 7px;
  padding: 2px 8px;
  background: #eeeee7;
  white-space: nowrap;
}
.z-chip.active {
  background: #dff0e7;
  color: #1c5b45;
}
.z-chip.review {
  background: #e9edfa;
  color: #435984;
}
.z-chip.draft {
  background: #fbf4cd;
  color: #655217;
}
.z-chip.retired {
  background: #efe3e1;
  color: var(--red);
}
.z-form label {
  margin-top: 10px;
}
.z-form input,
.z-form select,
.z-form textarea {
  min-height: 42px;
}
.z-form textarea {
  min-height: 64px;
}
.z-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.z-actions button {
  flex: 1 1 46%;
  font-size: 14px;
  font-weight: 600;
}
.z-note {
  font-size: 13px;
  line-height: 1.7;
  min-height: 1.4em;
  margin: 0;
}
.z-note.bad {
  color: var(--red);
  font-weight: 600;
}
.z-note.warn {
  color: #8a5a10;
  font-weight: 600;
}
.z-note.good {
  color: var(--green);
  font-weight: 600;
}
.z-mapwrap {
  position: relative;
  display: grid;
  gap: 10px;
}
#map {
  width: 100%;
  height: min(72vh, 760px);
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #e9ecdf;
  overflow: hidden;
}
.z-mapfail {
  display: grid;
  place-content: center;
  text-align: center;
  padding: 24px;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  direction: rtl;
}
.z-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13px;
}
.z-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.z-key i {
  width: 22px;
  height: 0;
  border-top: 2px solid var(--muted);
  display: inline-block;
}
.z-key i.dash {
  border-top-style: dashed;
  border-top-color: var(--action);
}
.z-key i.fill {
  height: 12px;
  border: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #e8632b88, #3b6ba588);
}
.z-attr {
  color: var(--muted);
  font-size: 12px;
  flex-basis: 100%;
}
.z-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--paper);
  font-size: 14px;
  display: grid;
  gap: 4px;
}
.z-card dt {
  color: var(--muted);
  font-size: 12px;
}
.z-card dd {
  margin: 0 0 6px;
  font-weight: 600;
}
.z-vmenu {
  display: grid;
  gap: 6px;
  min-width: 140px;
  text-align: center;
}
.z-vmenu button {
  background: var(--action);
  color: #fffaf5;
  font-weight: 600;
  min-height: 38px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 900px) {
  .z-grid {
    grid-template-columns: 1fr;
  }
  .z-mapwrap {
    order: -1;
  }
  .z-list {
    max-height: none;
  }
}

/* ---------- تبويبات اللوحة وأدوات المراجعة ---------- */
.z-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.z-tabs button {
  flex: 1;
  font-weight: 700;
  border: 1px solid var(--line);
  background: var(--card);
}
.z-tabs button[aria-selected="true"] {
  background: var(--action);
  color: #fffaf5;
  border-color: var(--action);
}
.z-pane {
  display: grid;
  gap: 12px;
}
.z-sub {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--paper);
  display: grid;
  gap: 8px;
}
.z-sub h3 {
  font-size: 15px;
}
.z-filters {
  display: grid;
  gap: 8px;
}
.z-filters input,
.z-filters select {
  min-height: 40px;
}
.z-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin: 0;
}
.z-check input {
  width: 20px;
  min-height: 20px;
}
.z-quad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.z-quad label {
  margin: 0;
  font-size: 13px;
}
.z-aliases {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  margin: 12px 0 0;
}
.z-aliases legend {
  font-weight: 700;
  font-size: 13px;
  padding: 0 6px;
}
.z-alias {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.z-alias select {
  width: 84px;
  min-height: 38px;
}
.z-alias input {
  min-height: 38px;
}
.z-alias button {
  min-height: 38px;
  padding: 0 10px;
  color: var(--red);
  border: 1px solid var(--line);
}
.z-dirty {
  background: #fbf4cd;
  color: #655217;
  border: 1px solid #e4d38a;
  border-radius: 8px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 13px;
}
.z-warnnote {
  background: var(--soft);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--action);
  margin: 0;
}
.z-chip.approved {
  background: #dbe9df;
  color: #1c5b45;
}
.z-chip.pending {
  background: #fbf4cd;
  color: #655217;
}
.z-chip.hidden {
  background: #e7e7e0;
  color: var(--muted);
}
.z-chip.low {
  background: #f6e0dc;
  color: var(--red);
}
.z-chip.medium {
  background: #fbf4cd;
  color: #655217;
}
.z-chip.high {
  background: #dff0e7;
  color: #1c5b45;
}
.z-chip.clipped {
  background: #e9edfa;
  color: #435984;
}
.z-item-btn.is-dim {
  opacity: 0.55;
}
.z-rowline {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.z-rowsub {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.z-key i.dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
}
.z-key i.dot.red {
  background: #c62828;
}
.z-key i.dot.amber {
  background: #ef8f24;
}
.z-key i.dot.navy {
  background: #25406e;
}
.z-link {
  min-height: 0;
  padding: 2px 6px;
  color: var(--action);
  text-decoration: underline;
  font-size: 13px;
  font-weight: 600;
}

/* ---------- استكشاف Google: نتائج مؤقتة تُميَّز بصرياً عن معالم وصل ---------- */
.z-tempnote {
  background: #fbf4cd;
  border: 1px solid #e4d38a;
  border-inline-start: 5px solid #a8802a;
  color: #655217;
}
.z-dlabel {
  margin: 0;
  font-size: 13px;
}
.z-temp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed #b49bd6;
  border-radius: 12px;
  background: var(--card);
  padding: 8px 10px;
}
.z-chip.source {
  background: #ece7f5;
  color: #5b3f80;
}
.z-chip.temp {
  background: #f1ecf8;
  color: #5b3f80;
  border: 1px dashed #b49bd6;
}
.z-prov {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin: 4px 0 0;
}
.z-prov a {
  text-decoration: underline;
}
.z-key i.dia {
  width: 11px;
  height: 11px;
  border: 2px solid #7b4fa8;
  border-radius: 2px;
  transform: rotate(45deg);
}

/* ---------- أدوات تعديل الحدود والمعاينة ---------- */
.z-edittools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 4px;
}
.z-edittools button {
  flex: 1 1 30%;
  min-height: 38px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--card);
}
.z-edittools button[aria-pressed="true"] {
  background: var(--soft);
  border-color: #f0c4ac;
  color: var(--action);
}
.z-edittools button:disabled {
  opacity: 0.45;
}
.z-prevgrid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 4px 8px;
  font-size: 13px;
  align-items: center;
}
.z-prevgrid span {
  padding: 3px 0;
}
.z-prevgrid .z-prevhead {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.z-prevgrid .z-prevkey {
  font-weight: 600;
}
.z-prevgrid .z-prevdelta.up {
  color: var(--green);
  font-weight: 700;
}
.z-prevgrid .z-prevdelta.down {
  color: var(--red);
  font-weight: 700;
}
.z-fixbtn {
  min-height: 0;
  margin-inline-start: 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--action);
  border: 1px solid #f0c4ac;
  background: var(--soft);
  border-radius: 7px;
}
.z-chip.needs {
  background: #f6e0dc;
  color: var(--red);
}
.z-key i.ghost {
  border-top: 2px dashed #252924;
  opacity: 0.7;
}
