* { box-sizing: border-box; }

:root {
  --bg:#f2f4f7; --card:#fff; --text:#222; --muted:#666; --border:#e5e7eb;
  --shadow:0 8px 24px rgba(0,0,0,.08); --shadow-wide:0 14px 38px rgba(0,0,0,.09);
  --radius:18px; --blue:#2563eb; --indigo:#4f46e5; --dark:#111827; --green:#16a34a; --red:#dc2626;
}
html { min-height:100%; }
body {
  margin:0; font-family:"Montserrat", Arial, sans-serif;
  background:radial-gradient(circle at top left, rgba(37,99,235,.10), transparent 34rem), var(--bg);
  color:var(--text);
}
button,input,textarea,select { font-family:inherit; }
.container { width:min(100%,1180px); margin:0 auto; padding:18px; }
.page-header { max-width:1100px; margin:0 auto 18px; text-align:center; }
.eyebrow { margin:0 0 6px; color:var(--blue); font-weight:700; letter-spacing:.05em; text-transform:uppercase; font-size:13px; }
h1 { font-size:clamp(24px,3vw,38px); margin:0 0 8px; line-height:1.15; }
.subtitle { color:var(--muted); font-size:clamp(15px,1.7vw,18px); line-height:1.45; margin:0; }
.layout,.left-column,.right-column { display:grid; gap:18px; }
.left-column,.right-column { align-content:start; }
.card { background:var(--card); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow); border:1px solid rgba(255,255,255,.7); }
.section-title { font-size:18px; margin:0 0 14px; }
.form-grid { display:grid; gap:8px; }
.field-label { font-weight:700; font-size:14px; margin-top:4px; }
.required { color:var(--red); }
.optional { font-weight:400; color:var(--muted); font-size:12px; }
.text-input { width:100%; padding:14px; border:1px solid #d1d5db; border-radius:12px; font-size:16px; margin:0; background:#fff; }
.text-input:focus { outline:3px solid rgba(37,99,235,.16); border-color:#93c5fd; }
.text-input.invalid { border-color:var(--red); outline-color:rgba(220,38,38,.14); }
.textarea { min-height:110px; resize:vertical; }
.help-text { margin:-2px 0 4px; font-size:12px; color:var(--muted); line-height:1.45; }
.field-error { min-height:18px; font-size:12px; color:var(--red); }
.consent-block { background:#f9fafb; border:1px solid var(--border); border-radius:12px; padding:12px; }
.checkbox-line { display:flex; gap:10px; align-items:flex-start; font-size:13px; line-height:1.45; color:#374151; }
.checkbox-line input { margin-top:3px; }
.link-button { border:0; background:transparent; padding:0; color:var(--blue); text-decoration:underline; cursor:pointer; font:inherit; }
.button-row { display:grid; gap:12px; margin-top:12px; }
.file-button,.main-button,.confirm-button { display:block; width:100%; border:0; border-radius:14px; padding:16px; font-size:17px; font-weight:700; text-align:center; cursor:pointer; margin-bottom:12px; transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease; }
.file-button:hover,.main-button:hover,.confirm-button:hover { transform:translateY(-1px); box-shadow:0 8px 18px rgba(0,0,0,.12); }
.file-button:active,.main-button:active,.confirm-button:active { transform:translateY(0); box-shadow:none; }
.file-button { background:var(--blue); color:white; }
.gallery-button { background:var(--indigo); }
.main-button { background:var(--dark); color:white; }
.main-button:disabled { background:#6b7280; cursor:wait; transform:none; box-shadow:none; }
.confirm-button { background:var(--green); color:white; margin-top:14px; margin-bottom:0; }
.confirm-button:disabled { background:#9ca3af; cursor:not-allowed; transform:none; box-shadow:none; }
input[type=file] { display:none; }
.status { margin-top:14px; padding:12px; border-radius:12px; background:#eef2ff; color:#3730a3; font-size:14px; text-align:center; }
.preview { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:14px; }
.preview-box { position:relative; }
.preview img { width:100%; height:95px; object-fit:cover; border-radius:12px; border:1px solid #ddd; display:block; }
.remove-photo,.move-photo { position:absolute; border:0; border-radius:50%; color:white; font-weight:700; cursor:pointer; }
.remove-photo { top:-8px; right:-8px; width:26px; height:26px; background:var(--red); font-size:18px; line-height:22px; }
.move-photo { bottom:6px; width:24px; height:24px; background:rgba(17,24,39,.72); font-size:13px; }
.move-left { left:6px; } .move-right { right:6px; }
.map-wrapper { position:relative; height:360px; border-radius:16px; overflow:hidden; border:1px solid #ddd; background:#e5e7eb; }
#map { height:100%; transition:opacity .2s ease; }
.map-loading #map,.map-loading .pin { opacity:.35; }
.map-loader { display:none; position:absolute; inset:0; z-index:2000; align-items:center; justify-content:center; flex-direction:column; background:rgba(255,255,255,.35); pointer-events:none; }
.map-loading .map-loader { display:flex; }
.spinner { width:54px; height:54px; border:6px solid rgba(17,24,39,.18); border-top-color:var(--dark); border-radius:50%; animation:spin .8s linear infinite; }
.loader-text { margin-top:12px; font-size:15px; font-weight:700; color:var(--dark); text-shadow:0 1px 2px rgba(255,255,255,.8); }
@keyframes spin { to { transform:rotate(360deg); } }
.pin { position:absolute; left:50%; top:50%; transform:translate(-50%,-100%); font-size:42px; z-index:1000; pointer-events:none; text-shadow:0 2px 6px rgba(0,0,0,.35); transition:opacity .2s ease; }
.coords { margin-top:12px; font-size:15px; line-height:1.5; text-align:center; color:#333; }
.address-box { background:#f9fafb; border:1px solid var(--border); border-radius:12px; padding:12px; margin-bottom:10px; }
.small { font-size:13px; color:#777; text-align:center; margin-top:8px; }
.thanks-box { margin-top:12px; padding:12px; border-radius:12px; background:#f0fdf4; border:1px solid #bbf7d0; color:#166534; font-size:14px; line-height:1.45; }
.form-message { margin-top:12px; font-size:14px; line-height:1.45; }
.form-message.error { color:var(--red); }
.form-message.success { padding:12px; border-radius:12px; background:#f0fdf4; border:1px solid #bbf7d0; color:#166534; }
.search-card { display:none; }
.search-help { font-size:14px; line-height:1.45; color:var(--muted); margin:-4px 0 12px; }
.search-box { position:relative; }
.search-input-wrap { position:relative; }
.search-input { padding-left:48px; padding-right:42px; }
.search-clear { display:none; position:absolute; right:8px; top:50%; transform:translateY(-50%); width:32px; height:32px; border:0; border-radius:50%; background:#f3f4f6; color:#4b5563; font-size:20px; line-height:28px; cursor:pointer; }
.search-clear.visible { display:block; }
.search-results { display:none; position:absolute; left:0; right:0; top:calc(100% + 8px); z-index:3000; background:white; border:1px solid var(--border); border-radius:14px; box-shadow:0 18px 38px rgba(0,0,0,.16); overflow:hidden; max-height:330px; overflow-y:auto; }
.search-results.visible { display:block; }
.search-result,.search-message { padding:12px 14px; font-size:14px; line-height:1.35; border-bottom:1px solid #f3f4f6; }
.search-result { cursor:pointer; }
.search-result:hover,.search-result.active { background:#eef2ff; }
.search-result:last-child,.search-message:last-child { border-bottom:0; }
.search-result-title { font-weight:700; color:#111827; }
.search-result-subtitle { color:#6b7280; margin-top:3px; font-size:13px; }
.search-message { color:#6b7280; text-align:center; }
.modal[hidden] { display:none; }
.modal { position:fixed; inset:0; z-index:5000; display:grid; place-items:center; padding:20px; }
.modal-backdrop { position:absolute; inset:0; background:rgba(17,24,39,.55); }
.modal-panel { position:relative; width:min(100%,560px); max-height:min(90vh,720px); overflow:auto; background:#fff; border-radius:18px; padding:22px; box-shadow:0 24px 70px rgba(0,0,0,.28); line-height:1.55; }
.modal-panel h2 { margin:0 0 10px; }
.modal-close { position:absolute; top:10px; right:12px; width:34px; height:34px; border:0; border-radius:50%; background:#f3f4f6; font-size:24px; cursor:pointer; }
.modal-ok { margin:12px 0 0; }
@media (min-width:560px) { .container{padding:28px}.card{padding:22px}.preview{grid-template-columns:repeat(5,1fr)}.preview img{height:110px}.button-row{grid-template-columns:1fr 1fr}.file-button{margin-bottom:0} }
@media (min-width:860px) { .container{padding:34px}.page-header{margin-bottom:24px}.layout{grid-template-columns:minmax(320px,.85fr) minmax(440px,1.15fr);align-items:start}.card{box-shadow:var(--shadow-wide)}.map-card{position:sticky;top:24px}.map-wrapper{height:min(56vh,570px);min-height:420px}.gps-card{display:none}.search-card{display:block} }
@media (min-width:1100px) { .layout{grid-template-columns:420px 1fr}.map-wrapper{min-height:480px} }

/* 3.1 frontend finomítások */
.form-grid { gap: 5px; }
.field-label { margin-top: 6px; }
.field-error { min-height: 12px; line-height: 1.2; }
.help-text { margin: -1px 0 2px; }
.consent-block { padding: 10px; margin: 2px 0 4px; }
.text-input { padding: 12px 14px; }
.textarea { min-height: 95px; }

.install-banner {
  width: min(100%, 760px);
  margin: 0 auto 18px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.4;
}
.install-banner[hidden] { display: none; }
.install-actions { display: flex; gap: 8px; flex-shrink: 0; }
.secondary-button {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: #1f2937;
  font-weight: 700;
  cursor: pointer;
}
.compact-button { width: auto; margin: 0; padding: 10px 12px; font-size: 14px; }

.report-id-box {
  margin: 14px 0;
  padding: 14px;
  border-radius: 14px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  text-align: center;
}
.report-id-box span { display: block; color: #4b5563; font-size: 13px; margin-bottom: 4px; }
.report-id-box strong { font-size: 24px; color: #111827; letter-spacing: .02em; }
.success-panel { text-align: center; }
.small-left { text-align: left; font-size: 13px; color: #6b7280; }

@media (max-width: 559px) {
  .install-banner { align-items: stretch; flex-direction: column; }
  .install-actions { justify-content: flex-end; }
}

@media (min-width: 860px) {
  .right-column { position: sticky; top: 24px; }
  .map-card { position: static; top: auto; }
  .search-card { padding: 18px; }
  .search-card .section-title { margin-bottom: 8px; }
  .search-help { margin-bottom: 10px; }
  .map-wrapper { height: min(48vh, 500px); min-height: 360px; }
}

@media (min-width: 1100px) {
  .map-wrapper { min-height: 420px; }
}
