:root { font-family: Arial, sans-serif; color: #172033; background: #eef3f8; }
.wrap { max-width: 1180px; margin: 40px auto; padding: 0 18px; }
h1 { margin-bottom: 20px; }
.card { background: white; border-radius: 18px; padding: 24px; box-shadow: 0 10px 30px rgba(20,30,50,.08); }
.wide { max-width: 1180px; }
label { display: block; font-weight: 700; margin-top: 16px; }
input, select { width: 100%; padding: 12px; border: 1px solid #c8d2df; border-radius: 10px; margin-top: 6px; box-sizing: border-box; }
button, .button { display: inline-block; margin-top: 22px; background: #1d4ed8; color: white; text-decoration: none; border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 700; cursor: pointer; }
button:disabled { opacity:.65; cursor: wait; }
.flash { background: #ffe8e8; color: #8a1f1f; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; }
.check { font-weight: 500; display: flex; gap: 10px; align-items: center; }
.check input { width: auto; }
.req { color: #b91c1c; font-size: 12px; }.opt,.muted { color: #64748b; font-size: 13px; }
table { width: 100%; border-collapse: collapse; margin-top: 18px; }
th, td { border-bottom: 1px solid #e5eaf0; padding: 10px; text-align: left; } th { background: #f4f7fb; }
#map { height: 650px; margin-top: 22px; border-radius: 16px; overflow: hidden; border: 1px solid #c8d2df; }
.leaflet-control-layers { max-height: 520px; overflow: auto; }
.progress { width:100%; height:22px; background:#e5e7eb; border-radius:999px; overflow:hidden; margin-top:18px; border:1px solid #cbd5e1; }
#progress-bar { height:100%; width:0%; background:#1d4ed8; transition:width .3s ease; }
#progress-text { margin-top:8px; font-weight:700; }
.error { color:#b91c1c; font-weight:700; }
.hidden { display:none; }
.indeterminate { height:100%; width:40%; background:#1d4ed8; animation:move 1.2s infinite linear; }
@keyframes move { from { margin-left:-40%; } to { margin-left:100%; } }



/* HRSZ DXF V4 modern térképes felület */
body {
  background: #f4f7fb;
}

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(600px, 1fr) 330px;
  gap: 14px;
  min-height: calc(100vh - 20px);
  padding: 10px;
}

.left-panel,
.right-panel,
.map-card,
.table-card,
.side-card {
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(15,23,42,.06);
}

.left-panel {
  padding: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 16px;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  display: grid;
  place-items: center;
}

.side-card {
  padding: 14px;
  margin-bottom: 14px;
}

.step-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  margin-bottom: 10px;
}

.step-title span {
  background: #2563eb;
  color: white;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
}

.muted {
  color: #64748b;
  line-height: 1.5;
}

.percent {
  text-align: center;
  font-size: 28px;
  font-weight: 900;
  color: #16a34a;
}

.progress {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 14px;
}

.progress div {
  height: 100%;
  background: #16a34a;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}

.checklist li {
  padding: 4px 0;
  color: #334155;
}

.checklist li::before {
  content: "✓";
  color: #16a34a;
  font-weight: 900;
  margin-right: 7px;
}

.secondary-button {
  display: block;
  text-align: center;
  text-decoration: none;
  border: 1px solid #16a34a;
  color: #15803d;
  border-radius: 8px;
  padding: 10px;
  font-weight: 800;
}

.main-area {
  display: grid;
  grid-template-rows: minmax(520px, 1fr) auto;
  gap: 14px;
}

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

#map {
  height: 100%;
  min-height: 620px;
  width: 100%;
}

.floating-layers {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 999;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 240px;
  box-shadow: 0 12px 28px rgba(15,23,42,.12);
}

.floating-layers h3 {
  margin: 0 0 10px;
}

.floating-layers label {
  display: block;
  margin: 8px 0;
  font-size: 14px;
}

.red-line {
  display: inline-block;
  width: 30px;
  height: 4px;
  background: #e11d48;
  vertical-align: middle;
  margin-left: 8px;
  border-radius: 10px;
}

.blue-box {
  display: inline-block;
  width: 24px;
  height: 14px;
  border: 3px solid #2563eb;
  vertical-align: middle;
  margin-left: 8px;
}

.right-panel {
  padding: 16px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 20px);
}

.right-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.right-head h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.right-head span {
  color: #64748b;
  font-weight: 700;
}

.panel-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-buttons button {
  border: 1px solid #2563eb;
  background: #2563eb;
  color: white;
  border-radius: 8px;
  padding: 9px 13px;
  font-weight: 800;
  cursor: pointer;
}

.panel-buttons button:nth-child(2) {
  background: white;
  color: #2563eb;
}

.search-row {
  margin-bottom: 12px;
}

.search-row input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  padding: 11px;
  font-size: 14px;
}

#hrsz-list {
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}

.hrsz-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #edf1f7;
  padding: 11px 0;
}

.hrsz-row-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hrsz-row-top input {
  width: 18px;
  height: 18px;
}

.hrsz-row-top strong {
  font-size: 15px;
}

.hrsz-mini {
  display: flex;
  gap: 16px;
  color: #334155;
  font-size: 13px;
  margin-top: 3px;
}

.hrsz-actions {
  display: flex;
  gap: 5px;
}

.hrsz-actions button {
  width: 30px;
  height: 30px;
  border: 1px solid #d7dfeb;
  background: white;
  color: #2563eb;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 800;
}

.excel-button {
  margin-top: 14px;
  display: block;
  background: #16a34a;
  color: white;
  text-decoration: none;
  text-align: center;
  padding: 13px;
  border-radius: 8px;
  font-weight: 900;
}

.table-card {
  padding: 12px;
  overflow-x: auto;
}

.table-card h3 {
  margin: 0 0 10px;
}

.table-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table-card th,
.table-card td {
  border-bottom: 1px solid #edf1f7;
  padding: 8px 10px;
  text-align: left;
}

.parcel-popup h3 {
  margin: 0 0 10px;
}

.parcel-popup table {
  border-collapse: collapse;
  width: 100%;
}

.parcel-popup td {
  border-bottom: 1px solid #e5e7eb;
  padding: 6px 8px;
  vertical-align: top;
}

.parcel-popup button {
  margin-top: 10px;
  border: 0;
  background: #2563eb;
  color: white;
  border-radius: 7px;
  padding: 8px 10px;
  cursor: pointer;
}

@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .right-panel {
    max-height: none;
  }

  #map {
    min-height: 560px;
  }
}

/* V4 fullscreen javítás */
body {
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}

.container,
main,
.wrapper,
.content {
  max-width: none !important;
  width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
}

h1 {
  display: none !important;
}

.app-shell {
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  box-sizing: border-box;
  grid-template-columns: 320px minmax(0, 1fr) 360px !important;
  padding: 8px !important;
  gap: 10px !important;
}

.left-panel,
.right-panel {
  height: calc(100vh - 16px) !important;
  box-sizing: border-box;
  overflow-y: auto;
}

.main-area {
  height: calc(100vh - 16px) !important;
  min-width: 0 !important;
  grid-template-rows: minmax(0, 1fr) 220px !important;
}

.map-card {
  min-height: 0 !important;
}

#map {
  height: 100% !important;
  min-height: 0 !important;
}

.table-card {
  height: 220px !important;
  overflow: auto !important;
  box-sizing: border-box;
}

.right-panel {
  max-height: calc(100vh - 16px) !important;
}

#hrsz-list {
  min-height: 0 !important;
}

/* V4 GUI fix - teljes képernyő, nem csúszik össze */
html,
body {
  width: 100%;
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body > .container,
.container,
main,
.wrapper,
.content {
  max-width: none !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
}

h1,
body > h1 {
  display: none !important;
}

.app-shell {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  box-sizing: border-box !important;
  padding: 8px !important;
  display: grid !important;
  grid-template-columns: 300px minmax(0, 1fr) 360px !important;
  grid-template-rows: 1fr !important;
  gap: 10px !important;
  background: #f4f7fb !important;
}

.left-panel,
.right-panel {
  height: calc(100vh - 16px) !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

.main-area {
  height: calc(100vh - 16px) !important;
  min-height: 0 !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) 230px !important;
  gap: 10px !important;
}

.map-card {
  min-height: 0 !important;
  height: 100% !important;
}

#map {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

.table-card {
  height: 230px !important;
  min-height: 0 !important;
  overflow: auto !important;
  box-sizing: border-box !important;
}

.right-panel {
  max-height: calc(100vh - 16px) !important;
  display: flex !important;
  flex-direction: column !important;
}

#hrsz-list {
  min-height: 0 !important;
  flex: 1 1 auto !important;
  overflow-y: auto !important;
}

.excel-button {
  flex: 0 0 auto !important;
}

/* V4 GUI fix - teljes képernyő, nem csúszik össze */
html,
body {
  width: 100%;
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body > .container,
.container,
main,
.wrapper,
.content {
  max-width: none !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
}

h1,
body > h1 {
  display: none !important;
}

.app-shell {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  box-sizing: border-box !important;
  padding: 8px !important;
  display: grid !important;
  grid-template-columns: 300px minmax(0, 1fr) 360px !important;
  grid-template-rows: 1fr !important;
  gap: 10px !important;
  background: #f4f7fb !important;
}

.left-panel,
.right-panel {
  height: calc(100vh - 16px) !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

.main-area {
  height: calc(100vh - 16px) !important;
  min-height: 0 !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) 230px !important;
  gap: 10px !important;
}

.map-card {
  min-height: 0 !important;
  height: 100% !important;
}

#map {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

.table-card {
  height: 230px !important;
  min-height: 0 !important;
  overflow: auto !important;
  box-sizing: border-box !important;
}

.right-panel {
  max-height: calc(100vh - 16px) !important;
  display: flex !important;
  flex-direction: column !important;
}

#hrsz-list {
  min-height: 0 !important;
  flex: 1 1 auto !important;
  overflow-y: auto !important;
}

.excel-button {
  flex: 0 0 auto !important;
}

/* jobb panel végleges javítás */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  overflow: hidden !important;
}

.app-shell {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: grid !important;
  grid-template-columns: 280px minmax(0, calc(100vw - 640px)) 340px !important;
  gap: 8px !important;
  padding: 8px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.left-panel {
  width: 280px !important;
}

.right-panel {
  width: 340px !important;
  min-width: 340px !important;
  max-width: 340px !important;
  height: calc(100vh - 16px) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
}

.main-area {
  min-width: 0 !important;
  width: 100% !important;
  height: calc(100vh - 16px) !important;
  overflow: hidden !important;
}

#hrsz-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.hrsz-item {
  grid-template-columns: minmax(0, 1fr) 92px !important;
}

.hrsz-actions {
  width: 92px !important;
  display: flex !important;
  justify-content: flex-end !important;
}

.hrsz-actions button {
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
}

.excel-button {
  flex-shrink: 0 !important;
  margin-top: 10px !important;
}

/* UI fix: valódi 3 oszlop, jobb panel nem lóghat rá az alsó táblára */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  overflow: hidden !important;
}

.container,
main,
.wrapper,
.content {
  max-width: none !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
}

h1 {
  display: none !important;
}

.app-shell {
  position: fixed !important;
  inset: 0 !important;
  display: grid !important;
  grid-template-columns: 300px minmax(0, 1fr) 380px !important;
  grid-template-rows: 1fr !important;
  gap: 10px !important;
  padding: 8px !important;
  box-sizing: border-box !important;
  width: 100vw !important;
  height: 100vh !important;
  overflow: hidden !important;
  background: #f4f7fb !important;
}

.left-panel,
.right-panel,
.main-area {
  min-height: 0 !important;
  height: calc(100vh - 16px) !important;
  box-sizing: border-box !important;
}

.left-panel {
  width: 300px !important;
  overflow-y: auto !important;
}

.main-area {
  min-width: 0 !important;
  overflow: hidden !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) 230px !important;
  gap: 10px !important;
}

.map-card {
  position: relative !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#map {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

.table-card {
  height: 230px !important;
  min-height: 230px !important;
  overflow: auto !important;
}

.right-panel {
  width: 380px !important;
  min-width: 380px !important;
  max-width: 380px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  z-index: 5 !important;
}

#hrsz-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.hrsz-item {
  grid-template-columns: minmax(0, 1fr) 96px !important;
}

.hrsz-actions {
  width: 96px !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 5px !important;
}

.hrsz-actions button {
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
}

.excel-button {
  flex: 0 0 auto !important;
  margin-top: 10px !important;
  position: static !important;
}

.route-length-box {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 999;
  background: rgba(255,255,255,.96);
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 10px 25px rgba(15,23,42,.14);
  font-size: 14px;
}

.route-length-box span {
  color: #334155;
  margin-right: 8px;
}

.route-length-box b {
  color: #e11d48;
  font-size: 18px;
}


/* Jobb oldali érintett HRSZ panel keskenyebb - javított blokk */
.parcel-panel,
#parcelPanel {
  width: 300px !important;
  min-width: 300px !important;
  max-width: 300px !important;
  flex: 0 0 300px !important;
}

.parcel-list-item {
  padding: 10px 12px !important;
}

.parcel-actions {
  gap: 4px !important;
}

.parcel-actions button {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
}

@media (max-width: 1200px) {
  .parcel-panel,
  #parcelPanel {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    flex: 0 0 280px !important;
  }
}
