@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

:root {
  --bg: #070c15;
  --bg-darker: #04080e;
  --panel: rgba(13, 23, 42, 0.75);
  --panel-solid: #0d172a;
  --panel-2: rgba(10, 17, 32, 0.85);
  --panel-2-solid: #0a1120;
  --muted: #94a3b8;
  --text: #f8fafc;
  --text-bright: #ffffff;
  --brand: var(--identity-primary, #10b981); /* Emerald Green */
  --brand-hover: var(--identity-primary, #059669);
  --brand-2: var(--identity-secondary, #3b82f6); /* Blue */
  --brand-2-hover: var(--identity-secondary, #2563eb);
  --danger: #ef4444; /* Ruby Red */
  --warn: var(--identity-accent, #f59e0b); /* Amber */
  --accent: var(--identity-accent, #f59e0b);
  --orange: #f97316; /* Orange */
  --purple: #8b5cf6; /* Royal Purple */
  --line: rgba(255, 255, 255, 0.08);
  --line-focus: rgba(59, 130, 246, 0.4);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* Custom Scrollbar for premium look */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

body {
  margin: 0;
  font-family: 'Tajawal', "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.glass-panel {
  background: var(--panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* App Layout */
.app-shell {
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  min-height: 72px;
  background: rgba(8, 14, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.compact-topbar {
  position: relative;
}

.brand {
  font-weight: 900;
  font-size: 22px;
  white-space: nowrap;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, var(--muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.site-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
  margin-left: 10px;
  vertical-align: middle;
}

.topbar-select {
  max-width: 260px;
}

.pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 8px 18px;
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  transition: var(--transition);
}
.pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.map-layout {
  position: relative;
  overflow: hidden;
}

.map {
  width: 100%;
  height: 100%;
}

/* Form inputs & controls */
.input, .select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2-solid);
  color: var(--text-bright);
  padding: 12px 14px;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  transition: var(--transition);
}
.input:focus, .select:focus, textarea:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px var(--line-focus);
}
textarea {
  min-height: 100px;
  resize: vertical;
}

/* Premium Buttons */
.btn {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  background: var(--brand);
  color: #041a12;
  font-weight: 700;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}
.btn:hover {
  background: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}
.btn:active {
  transform: translateY(0);
}
.btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-bright);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-sm);
}
.btn.blue {
  background: var(--brand-2);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
.btn.blue:hover {
  background: var(--brand-2-hover);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}
.btn.danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}
.btn.danger:hover {
  background: #dc2626;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
}

.icon-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.icon-button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-bright);
  transform: scale(1.05);
}

/* Floating panels & elements */
.map-search-panel {
  position: absolute;
  top: 24px;
  right: 24px;
  width: min(480px, calc(100vw - 48px));
  z-index: 10;
}
.search-input {
  height: 52px;
  background: rgba(9, 15, 28, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  padding-left: 20px;
  padding-right: 20px;
}
.search-input:focus {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: var(--shadow), 0 0 0 3px var(--line-focus);
}
.search-results {
  display: none;
  margin-top: 10px;
  background: rgba(9, 15, 28, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: fadeIn 0.2s ease-out;
}
.search-results.show {
  display: block;
}
.search-result {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  display: grid;
  gap: 2px;
  text-align: right;
  padding: 14px 18px;
  cursor: pointer;
  transition: var(--transition);
}
.search-result:last-child {
  border-bottom: 0;
}
.search-result:hover {
  background: rgba(255, 255, 255, 0.05);
  padding-right: 22px;
}
.search-result strong {
  color: var(--text-bright);
  font-size: 15px;
}
.search-result span {
  color: var(--muted);
  font-size: 12px;
}

.floating-actions {
  position: absolute;
  right: 24px;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9;
}
.round-action {
  min-height: 46px;
  border: 1px solid var(--line);
  background: rgba(9, 15, 28, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.round-action:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.round-action.active {
  background: var(--brand);
  color: #041a12;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border-radius: 99px;
  background: var(--danger);
  color: white;
  font-size: 12px;
  margin-right: 6px;
  padding: 0 4px;
}/* Drawers styling with Glass effect */
.drawer {
  position: absolute;
  z-index: 1000;
  background: rgba(7, 12, 22, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  display: flex;
  flex-direction: column;
}
.drawer-right {
  top: 0;
  bottom: 0;
  right: 0;
  width: min(400px, 90vw);
  transform: translateX(105%);
  opacity: 0;
  border-right: 0;
}
.drawer.open {
  transform: translateX(0) translateY(0);
  opacity: 1;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.drawer-head h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  color: var(--text-bright);
}
.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px;
  display: grid;
  gap: 10px;
}
.drawer-content .filter-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.filter-section {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  display: grid;
  gap: 10px;
}
.filter-section h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text-bright);
}
.filter-section label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.filter-section label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.filter-grid {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.filter-grid h3 {
  grid-column: 1 / -1;
}

.drawer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--line);
  background: rgba(9, 15, 28, 0.96);
  z-index: 2;
}
.drawer-actions .btn:last-child {
  grid-column: 1 / -1;
}.layer-list label {
  justify-content: space-between;
  flex-direction: row-reverse;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  transition: var(--transition);
}
.layer-list label:hover {
  background: rgba(255, 255, 255, 0.07);
}

/* Results panel on the left */
.results-panel {
  position: absolute;
  left: 24px;
  top: 24px;
  width: 320px;
  max-height: calc(100vh - 120px);
  z-index: 8;
  background: rgba(8, 14, 26, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  overflow-y: auto;
}
.muted-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.results-list {
  display: grid;
  gap: 10px;
}
.result-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: right;
  color: var(--text);
  display: grid;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.result-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}
.result-card strong {
  color: var(--text-bright);
  font-size: 15px;
}
.result-card span {
  font-size: 13px;
}
.result-card small {
  color: var(--muted);
  font-size: 11px;
}

/* Elegant Bottom Sheet for details */
.bottom-sheet {
  position: absolute;
  right: 50%;
  transform: translateX(50%);
  bottom: 24px;
  width: 580px;
  max-width: calc(100vw - 48px);
  max-height: 72vh;
  overflow-y: auto;
  background: rgba(7, 12, 22, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  z-index: 1000;
  display: none;
  box-shadow: var(--shadow);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.bottom-sheet.show {
  display: block;
}
.sheet-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-bright);
}
.sheet-head {
  margin-bottom: 16px;
}
.sheet-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.meta div {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  min-width: 0;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.meta small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.meta div span {
  font-weight: 700;
  color: var(--text-bright);
}

.legend {
  position: absolute;
  left: 24px;
  bottom: 24px;
  background: rgba(8, 14, 26, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  z-index: 7;
  display: grid;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.legend div {
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 8px;
}

/* Beautiful georeferenced labels */
.parcel-label {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 22px;
  min-height: 18px;
  padding: 2px 5px 1px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.62);
  font-size: 12px;
  line-height: 1.08;
  font-weight: 900;
  font-family: 'Tajawal', sans-serif;
  white-space: nowrap;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.35), 0 0 0 2px rgba(255, 255, 255, 0.42);
  pointer-events: none;
  z-index: 100;
}

.parcel-label-zoom-19 {
  font-size: 13px;
  min-width: 24px;
  min-height: 19px;
}

.parcel-label-zoom-20 {
  font-size: 14px;
  min-width: 26px;
  min-height: 21px;
  padding-inline: 6px;
}

.district-label {
  position: absolute;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(29, 78, 216, 0.95));
  backdrop-filter: blur(4.5px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 15px;
  font-weight: 900;
  font-family: 'Tajawal', sans-serif;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35), 0 2px 6px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 110;
  letter-spacing: 0.3px;
}

/* Neighbor district labels — muted style */
.neighbor-district-label {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(71, 85, 105, 0.85);
  backdrop-filter: blur(3px);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Tajawal', sans-serif;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 105;
  cursor: pointer;
}

/* Block labels — cyan accent */
.block-label {
  position: absolute;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.92), rgba(2, 132, 199, 0.92));
  backdrop-filter: blur(4px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 800;
  font-family: 'Tajawal', sans-serif;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(14, 165, 233, 0.30);
  pointer-events: none;
  z-index: 102;
}

/* Zone labels — styled with subtle glow */
.zone-label-styled {
  position: absolute;
  transform: translate(-50%, -50%);
  background: transparent;
  border: none;
  padding: 0;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 900;
  font-family: 'Tajawal', sans-serif;
  white-space: normal;
  text-align: center;
  word-wrap: break-word;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 0 6px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  z-index: 104;
}

/* Landmark name labels */
.landmark-name-label {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(5, 9, 20, 0.85);
  backdrop-filter: blur(4px);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Tajawal', sans-serif;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 101;
}

/* Parcel Hover Tooltip — follows the mouse cursor */
.parcel-hover-tooltip {
  position: absolute;
  z-index: 1500;
  background: rgba(5, 9, 20, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 8px 14px;
  display: none;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.15s ease-out;
  max-width: 260px;
}

.parcel-hover-tooltip strong {
  display: block;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  font-family: 'Tajawal', sans-serif;
  margin-bottom: 2px;
}

.parcel-hover-tooltip span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 600;
  font-family: 'Tajawal', sans-serif;
}

.listing-pulse-pin {
  position: absolute;
  width: 34px;
  height: 42px;
  transform: translate(-50%, -100%);
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.5));
}
.listing-pulse-pin::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50% 50% 50% 0;
  background: var(--identity-map-highlight, #facc15);
  border: 3px solid #fff;
  transform: rotate(-45deg);
  box-shadow: 0 0 0 2px rgba(4,8,18,.55), 0 0 18px rgba(250,204,21,.95);
  animation: listingPinGlow 1.05s ease-in-out infinite;
}
.listing-pulse-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 23px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--identity-map-highlight, #facc15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: listingPinPulse 1.05s ease-out infinite;
  background: rgba(250,204,21,.18);
}
.listing-pulse-pin .pin-count {
  position: absolute;
  top: -7px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  border: 2px solid #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}
@keyframes listingPinGlow {
  0%,100% { transform: rotate(-45deg) scale(1); opacity: 1; }
  50% { transform: rotate(-45deg) scale(1.22); opacity: .78; }
}
@keyframes listingPinPulse {
  0% { opacity: .9; transform: translate(-50%, -50%) scale(.55); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.45); }
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* Admin Styling Layout */
.admin-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #050911;
  border-left: 1px solid var(--line);
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.sidebar .brand {
  margin-bottom: 4px;
}
.sidebar a {
  display: block;
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin: 6px 0;
  font-weight: 500;
  font-size: 14px;
}
.nav-logout-form {
  margin: 0;
}
.nav-logout-button {
  width: 100%;
  border: 0;
  background: transparent;
  display: block;
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin: 6px 0;
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  text-align: right;
  cursor: pointer;
}
.sidebar a:hover, .sidebar a.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-bright);
}
.sidebar .nav-logout-button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-bright);
}
.sidebar a.active {
  background: var(--brand-2);
  color: white;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
.content {
  padding: 28px;
  background: var(--bg);
}
.card {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: right;
  font-size: 14px;
}
.table th {
  color: var(--text-bright);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.02);
}

.stats {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}
.stat {
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  text-align: right;
}
.stat strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.2;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

/* Map editor workspace */
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  grid-template-rows: minmax(440px, 1fr) minmax(180px, 240px);
  grid-template-areas: 
    "map tools" 
    "list tools";
  gap: 16px;
  height: calc(100vh - 40px);
  min-width: 0;
}
.map-editor-page > .editor-panel:first-child {
  grid-area: list;
  min-height: 0;
}
.map-editor-page > .editor-map {
  grid-area: map;
}
.map-editor-page > .editor-panel:last-child {
  grid-area: tools;
  min-height: 0;
}
.editor-map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 0;
  box-shadow: var(--shadow-sm);
}
.editor-panel {
  overflow-y: auto;
  min-width: 0;
}
.editor-tool-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 16px;
}
.editor-tool-button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}
.editor-tool-button:hover {
  background: rgba(255,255,255,0.08);
}
.editor-tool-button.active {
  background: var(--brand);
  color: #041a12;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}
.editor-tool-panel {
  display: none;
}
.editor-tool-panel.active {
  display: block;
}
.editor-tool-panel > h2 {
  font-size: 18px;
  margin: 0 0 14px;
  color: var(--text-bright);
}
.editor-tool-panel > hr:first-child {
  display: none;
}

.editor-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 12px 0;
}
.editor-tab {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 8px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.editor-tab.active {
  background: var(--brand);
  color: #041a12;
  border-color: transparent;
}

.editor-tab.loading {
  opacity: 0.68;
  cursor: progress;
}
.editor-label-controls {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.bulk-panel, .batch-preview, .overlay-list {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}

.selected-block-summary {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.55);
  border-radius: 6px;
}

.selected-block-summary.has-selection {
  border-color: rgba(34, 197, 94, 0.65);
  color: #dcfce7;
}

.road-type-options .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.road-type-options .chip input {
  margin: 0;
}

.split-preview-summary {
  padding: 10px 12px;
  border: 1px solid rgba(250, 204, 21, 0.45);
  background: rgba(15, 23, 42, 0.68);
  border-radius: 6px;
  line-height: 1.75;
}

.split-preview-summary.has-conflicts {
  border-color: rgba(239, 68, 68, 0.7);
  color: #fecaca;
}
.quality-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  margin-top: 10px;
  max-height: 220px;
  overflow-y: auto;
}
.quality-panel strong {
  color: var(--text-bright);
}
.quality-panel button {
  width: 100%;
  margin-top: 6px;
  text-align: right;
  justify-content: flex-start;
}
.batch-preview {
  max-height: 180px;
  overflow-y: auto;
}
.overlay-list {
  display: grid;
  gap: 8px;
}
.overlay-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  color: var(--text);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 6px 12px;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}
.chip:hover {
  background: rgba(255, 255, 255, 0.1);
}
.chip.active {
  background: var(--brand-2);
  color: white;
  border-color: transparent;
}
.chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.element-list {
  display: grid;
  gap: 8px;
  max-height: 140px;
  overflow-y: auto;
}
.element-item {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: right;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.element-item:hover {
  background: rgba(255, 255, 255, 0.07);
}
.element-item strong {
  color: var(--text-bright);
}
.element-item.active {
  border-color: var(--warn);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.form-stack {
  display: grid;
  gap: 12px;
}
.form-stack label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.toast {
  position: fixed;
  left: 24px;
  top: 24px;
  background: rgba(13, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  z-index: 99999;
  display: none;
  box-shadow: var(--shadow);
  animation: fadeIn 0.2s ease-out;
  font-weight: 700;
}
.toast.show {
  display: block;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translate(50%, 20px); }
  to { opacity: 1; transform: translate(50%, 0); }
}

/* Media Queries */
@media (max-width: 1100px) {
  .editor-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto 70vh auto;
    grid-template-areas: 
      "tools" 
      "map" 
      "list";
    height: auto;
  }
  .editor-map {
    height: 70vh;
    min-height: 480px;
  }
  .element-list {
    max-height: 280px;
  }
  .results-panel {
    display: none;
  }
}

@media (max-width: 800px) {
  .topbar {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px;
    gap: 12px;
  }
  .brand {
    font-size: 20px;
  }
  .topbar-select {
    max-width: none;
    flex: 1 1 100%;
  }
  .map-search-panel {
    top: 16px;
    right: 16px;
    width: calc(100vw - 32px);
  }
  .floating-actions {
    right: 16px;
    top: 84px;
  }
  .round-action {
    min-height: 46px;
  }
  .drawer-right {
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(78vh, 700px);
    border-radius: 24px 24px 0 0;
    transform: translateY(105%);
    border-top: 1px solid var(--line);
  }
  .drawer.open {
    transform: translateY(0) translateX(0);
  }
  .drawer-actions {
    bottom: -24px;
  }
  .bottom-sheet {
    bottom: 0;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 100%;
    max-height: 78vh;
    transform: none;
    right: 0;
    animation: slideUpMobile 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  @keyframes slideUpMobile {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .meta {
    grid-template-columns: 1fr;
  }
  .legend {
    display: none;
  }
  .admin-layout {
    display: block;
  }
  .sidebar {
    height: auto;
    position: relative;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
  .editor-grid {
    display: block;
    height: auto;
  }
  .editor-map {
    height: 65vh;
    margin: 16px 0;
  }
  .grid, .form-row, .settings-grid, .settings-pages-grid {
    grid-template-columns: 1fr;
  }
}

/* ══ Public Shell Overrides (uses pub-* classes in public.css) ══ */
.public-shell .topbar         { display: none; }
.public-shell .map-search-panel { display: none; }
.public-shell .floating-actions { display: none; }
.public-shell .results-panel  { display: none; }
.public-shell .legend         { display: none; }

/* Toast enhancements */
.toast-success { border-color: rgba(16,185,129,0.35) !important; }
.toast-error   { border-color: rgba(239,68,68,0.35) !important; color: #fca5a5; }

.notice {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 12px 0;
  font-weight: 700;
}
.notice.success { border-color: rgba(16,185,129,.35); background: rgba(16,185,129,.08); }
.notice.error { border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.08); color: #fecaca; }
.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}
.settings-tabs a {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  background: rgba(255,255,255,.04);
  font-weight: 700;
  font-size: 14px;
}
.settings-tabs a.active {
  background: var(--brand-2);
  border-color: transparent;
  color: #fff;
}
.settings-form { display: grid; gap: 18px; }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.settings-field {
  display: grid;
  gap: 7px;
  font-weight: 700;
  font-size: 13px;
}
.settings-field input[type="color"] {
  min-height: 46px;
  padding: 5px;
}
.settings-actions {
  display: flex;
  justify-content: flex-start;
}
.toggle-row, .settings-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.settings-checks {
  display: grid;
  gap: 10px;
  align-content: center;
}
.settings-pages-grid {
  grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr);
}
.admin-thumb {
  width: 44px !important;
  height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
  display: block;
}
.table td .admin-thumb {
  inline-size: 44px !important;
  block-size: 44px !important;
}
.coverage-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: grid;
  gap: 10px;
}
.coverage-box h2 {
  margin: 0 0 4px;
}
.coverage-district {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: grid;
  gap: 7px;
}
.coverage-zone {
  margin-right: 22px;
  color: var(--muted);
}

/* Office portal */
.office-body {
  background: var(--bg);
}
.office-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}
.office-nav {
  background: #050911;
  border-left: 1px solid var(--line);
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.office-nav a {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 700;
}
.office-nav .nav-logout-button {
  padding: 12px 14px;
  margin: 0;
  font-weight: 700;
}
.office-nav a:hover,
.office-nav a.active {
  background: rgba(255,255,255,.07);
  color: var(--text-bright);
}
.office-nav .nav-logout-button:hover {
  background: rgba(255,255,255,.07);
  color: var(--text-bright);
}
.office-nav a.active {
  background: var(--brand-2);
  color: #fff;
}
.office-brand {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.office-brand img,
.office-brand > span,
.office-profile-logo img,
.office-profile-logo span {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 900;
  color: var(--text-bright);
}
.office-brand strong {
  display: block;
  color: var(--text-bright);
  font-size: 15px;
}
.office-brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.office-main {
  padding: 28px;
  min-width: 0;
}
.office-page-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.office-page-head h1 {
  margin: 0 0 4px;
}
.office-profile-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}
.office-profile-logo img,
.office-profile-logo span {
  width: 86px;
  height: 86px;
  font-size: 34px;
}
.office-profile-card h2 {
  margin: 0 0 8px;
}
.office-status-pill {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 99px;
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.35);
  color: #bbf7d0;
  font-weight: 800;
  margin: 0 0 8px;
}
.office-stats {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.office-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.office-primary-action {
  min-height: 50px;
  font-size: 15px;
}
.office-primary-action[aria-disabled="true"] {
  opacity: .65;
  cursor: not-allowed;
}
.office-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.office-inline-actions form {
  margin: 0;
}
.office-table-wrap {
  overflow-x: auto;
}
.office-table-wrap .table {
  min-width: 820px;
}
.office-narrow-card {
  max-width: 560px;
}
.office-picker-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
.office-picker-controls label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
}
.office-picker-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 14px;
}
.office-picker-map {
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--panel-2-solid);
}
.office-picker-results {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: rgba(255,255,255,.03);
  min-height: 160px;
}
.office-picker-results h3 {
  margin: 0 0 10px;
}
.office-picker-list {
  display: grid;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
}
.office-picker-result {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 10px 12px;
  text-align: right;
  font-family: inherit;
  cursor: pointer;
}
.office-picker-result strong,
.office-picker-result span {
  display: block;
}
.office-picker-result span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.office-picker-result:hover {
  background: rgba(255,255,255,.09);
}
.office-selected-parcel {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.office-selected-parcel[hidden] {
  display: none;
}
.listing-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.listing-image-admin {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  padding: 10px;
  display: grid;
  gap: 8px;
}
.listing-image-admin img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

@media (max-width: 800px) {
  .office-shell {
    display: block;
  }
  .office-nav {
    height: auto;
    position: relative;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
  .office-main {
    padding: 18px 14px;
  }
  .office-page-head {
    display: grid;
  }
  .office-profile-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .office-profile-logo img,
  .office-profile-logo span {
    width: 64px;
    height: 64px;
    font-size: 26px;
  }
  .office-picker-controls,
  .office-picker-grid {
    grid-template-columns: 1fr;
  }
  .office-picker-map {
    min-height: 320px;
  }
}

/* Custom Map Info Bubble Container */
.map-info-bubble-container {
  position: absolute;
  transform: translate(0, -50%);
  margin-left: 46px; /* Offset to float on the right side of the beacon, increased for longer and thinner tail */
  z-index: 1500;
  pointer-events: auto; /* Allow clicking inside the bubble */
}

/* Info Bubble Box */
.map-info-bubble {
  background: rgba(7, 12, 22, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 12px 16px;
  min-width: 200px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  animation: bubbleBounceIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #ffffff;
  font-family: 'Tajawal', sans-serif;
  direction: rtl;
}

@keyframes bubbleBounceIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.bubble-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.bubble-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.bubble-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
.bubble-badge[data-status="for_sale"] {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.bubble-badge[data-status="reserved"] {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.bubble-badge[data-status="sold"] {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.bubble-badge[data-status="not_listed"] {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.bubble-badge[data-status="landmark"] {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.bubble-badge[data-status="block"] {
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.bubble-badge[data-status="road"] {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.bubble-meta {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}

.bubble-price {
  font-size: 14px;
  font-weight: 800;
  color: #fbbf24; /* Golden color for price */
  margin-bottom: 4px;
}

.bubble-desc {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}

/* Pointer Arrow */
.bubble-pointer-wrapper {
  position: absolute;
  left: -37px; /* Float on the left edge of the bubble, pointing left to the beacon, increased for longer and thinner tail */
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 12px;
  pointer-events: none;
}

.bubble-pointer-svg {
  display: block;
}

/* Specific styling for the Map Details Bubble */
.map-info-bubble.details-bubble {
  width: 440px;
  max-width: calc(100vw - 32px);
  padding: 20px;
}
.map-info-bubble.details-bubble .meta {
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 10px;
  margin: 12px 0 16px 0;
}
.map-info-bubble.details-bubble .meta div {
  padding: 6px 10px;
}
.map-info-bubble.details-bubble .sheet-actions {
  margin-top: 14px;
}

.shape-type-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.shape-type-tab {
  min-height: 34px;
  padding: 7px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.shape-type-tab:hover {
  border-color: rgba(56, 189, 248, 0.55);
  color: var(--text-bright);
}

.shape-type-tab.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.16);
  color: #e0f2fe;
}
/* Structured parcel details and the 14 m road key */
.road-14-key{display:flex;align-items:center;gap:8px;margin:2px 28px 6px 0;color:var(--muted);font-size:12px}
.road-14-key span{width:24px;height:4px;border-radius:2px;background:#22d3ee;box-shadow:0 0 0 1px rgba(15,23,42,.75)}
.parcel-shell-head{margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid var(--line)}
.parcel-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}
.parcel-detail-number{font-size:24px;font-weight:900;color:var(--text-bright);line-height:1.25}
.parcel-detail-location{margin-top:5px;color:var(--muted);font-size:13px;line-height:1.6}
.parcel-status-badge{display:inline-flex;align-items:center;min-height:28px;padding:4px 10px;border:1px solid var(--line);border-radius:999px;font-size:12px;font-weight:800;white-space:nowrap;background:rgba(148,163,184,.12)}
.parcel-status-for_sale{color:#86efac;border-color:rgba(34,197,94,.4);background:rgba(34,197,94,.12)}
.parcel-status-reserved{color:#fde68a;border-color:rgba(245,158,11,.45);background:rgba(245,158,11,.12)}
.parcel-status-sold{color:#fca5a5;border-color:rgba(239,68,68,.4);background:rgba(239,68,68,.12)}
.parcel-status-needs_update{color:#fdba74;border-color:rgba(249,115,22,.4);background:rgba(249,115,22,.12)}
.parcel-quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.parcel-quick-item{min-width:0;padding:10px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.035);display:grid;gap:4px}
.parcel-quick-item small{color:var(--muted);font-size:11px;font-weight:700}
.parcel-quick-item strong{color:var(--text-bright);font-size:13px;overflow-wrap:anywhere}
.parcel-listings-section{margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.parcel-section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.parcel-section-title h3{margin:0;font-size:16px}
.parcel-section-title span{color:var(--muted);font-size:12px}
.parcel-empty-listings{margin:0;padding:12px;border:1px dashed var(--line);border-radius:8px;color:var(--muted);font-size:13px}
.parcel-offer-card{display:grid;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}
.parcel-offer-card:last-child{border-bottom:0}
.parcel-offer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.parcel-offer-head>div{display:grid;gap:3px}
.parcel-offer-head small,.parcel-offer-updated{color:var(--muted);font-size:11px}
.parcel-offer-head strong{font-size:13px;color:var(--text-bright)}
.parcel-offer-price{color:#86efac!important;text-align:left}
.parcel-offer-actions{display:flex;gap:8px;flex-wrap:wrap}
.parcel-offer-actions .btn{min-height:34px;padding:7px 12px;font-size:12px}
.parcel-legal-notice{margin:14px 0 0;color:var(--muted);font-size:11px;line-height:1.6}
.parcel-primary-actions{padding-top:14px;border-top:1px solid var(--line)}
@media (max-width:767px){
  .bottom-sheet{right:0;bottom:0;transform:none;width:100%;max-width:none;max-height:82vh;border-radius:12px 12px 0 0;padding:16px}
  .parcel-detail-number{font-size:21px}
  .parcel-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .parcel-primary-actions .btn{flex:1 1 calc(50% - 8px);justify-content:center}
}
.result-card-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:stretch}
.result-card-row .result-card{width:100%}
.result-share-button{border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.04);color:var(--text);font:inherit;font-size:11px;font-weight:800;padding:8px;cursor:pointer}
.result-share-button:hover{border-color:var(--brand);color:var(--text-bright)}
