:root{
  --o:#b00808;
  --t:#161616;
  --m:#8a8a8a;
  --b:#ececec;
  --g:#f6f6f6;
}

*{box-sizing:border-box;margin:0}

[hidden]{display:none !important}

body{
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  color:var(--t);
  background:#fff;
  font-size:13px;
}

svg.i{
  width:20px;height:20px;
  fill:none;stroke:currentColor;
  stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;
  flex:none;
}

button,input{
  font:inherit;color:inherit;background:none;border:0;outline:0;
}

button{cursor:pointer}
a{color:inherit;text-decoration:none}
a,button{-webkit-tap-highlight-color:transparent;touch-action:manipulation}

/* ===== Header ===== */
header{
  height:78px;
  border-bottom:1px solid var(--b);
  display:flex;align-items:center;justify-content:space-between;
  padding:0 36px;
  position:relative;
  background:#fff;
}

.logo{
  display:flex;align-items:center;gap:10px;
  font-size:20px;font-weight:600;
}

.tools{display:flex;align-items:center;gap:14px}

.user{display:flex;align-items:center;gap:12px;margin-left:6px}
.user b{display:block;font-size:13px;font-weight:500}
.user small{font-size:11px;color:var(--m)}

.user-avatar{
  width:40px;height:40px;border-radius:50%;
  background:var(--o);color:#fff;
  font-size:16px;font-weight:700;
  display:flex;align-items:center;justify-content:center;
  flex:none;
}
.mobile-avatar{width:38px;height:38px;font-size:15px}

/* Daxil ol ikonu */
.login-ico{
  width:44px;height:44px;border-radius:50%;
  border:2px solid var(--o);
  display:grid;place-items:center;
  color:var(--o);background:#fff;
  transition:.2s;
}
.login-ico:hover{background:var(--o);color:#fff}
.login-ico svg{width:22px;height:22px;stroke-width:1.8}

.mobile-actions{display:none}

.desktop-add{
  display:flex;align-items:center;gap:8px;
  min-height:44px;padding:0 18px;
  border-radius:16px;
  background:var(--o);color:#fff;
  font-size:12.5px;font-weight:600;
  box-shadow:0 8px 20px rgba(176,8,8,.22);
  transition:.2s;
}

.desktop-add:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(176,8,8,.3);
}

.desktop-add svg{width:17px;height:17px;stroke-width:2.2}

.fav-btn{
  position:relative;
  display:flex;align-items:center;gap:8px;
  min-height:44px;padding:0 16px;
  border-radius:16px;
  border:1px solid var(--b);
  background:#fff;color:#444;
  font-size:12.5px;font-weight:600;
  transition:.2s;
}

.fav-btn svg{width:18px;height:18px;color:var(--o)}
.fav-btn:hover{border-color:var(--o)}
.fav-btn:active{transform:scale(.97)}

.fav-count{
  min-width:20px;height:20px;padding:0 6px;
  border-radius:10px;
  background:var(--o);color:#fff;
  font-size:10.5px;font-weight:600;
  display:grid;place-items:center;
}

.fav-mobile{display:none}

.bottom-nav{display:none}

/* ===== Yeni elan (mərkəz) ===== */
.new-page{
  padding:60px 36px 20px;
  background:#fff;
}

.new-box{
  max-width:900px;
  margin:0 auto;
  background:#fff;
  border-radius:0 0 28px 28px;
  padding:34px 48px 56px;
}

.new-box h1{
  text-align:center;
  font-size:24px;
  font-weight:700;
  color:#2b1a14;
  letter-spacing:-.3px;
  margin-bottom:56px;
}

.choices{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:24px;
}

.choice{
  display:flex;flex-direction:column;
  align-items:center;justify-content:center;
  gap:22px;
  height:178px;
  border:1px solid var(--b);
  border-radius:24px;
  background:#f7f7f7;
  color:#2b1a14;
  font-size:15px;
  text-align:center;
  padding:0 8px;
  min-width:0;
  transition:.2s;
}

.choice svg{width:42px;height:42px;stroke-width:1.9}

@media(hover:hover){
  .choice:hover{
    border-color:var(--o);
    background:#fdeeee;
    color:var(--o);
    transform:translateY(-2px);
    box-shadow:0 10px 26px rgba(176,8,8,.12);
  }
}

.choice:active{
  border-color:var(--o);
  background:#fdeeee;
  color:var(--o);
  transform:scale(.98);
}

/* ===== Geri düyməsi və elan növü ===== */
.back-btn{
  display:inline-flex;align-items:center;gap:6px;
  margin-bottom:28px;
  font-size:12.5px;font-weight:500;color:#777;
}

.back-btn svg{width:16px;height:16px;transform:rotate(90deg)}
.back-btn:hover{color:var(--t)}

.choices.types{grid-template-columns:repeat(4,minmax(0,1fr))}
.choices.types .choice{height:190px}

.choices.audience{grid-template-columns:repeat(3,minmax(0,1fr))}

/* ===== Footer ===== */
footer{
  border-top:1px solid var(--b);
  margin-top:30px;
  padding:26px 36px 18px;
  background:#fff;
  text-align:center;
}

.f-top{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:12px;max-width:720px;margin:0 auto;
}

.f-brand{font-size:20px;font-weight:600}

.f-desc{
  max-width:620px;font-size:12.5px;
  line-height:1.55;color:var(--m);margin:0 auto;
}

.f-bottom{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:8px;border-top:1px solid var(--b);
  margin-top:20px;padding-top:14px;
  font-size:11.5px;color:var(--m);
}

/* ===== Form: sahələr ===== */
.prop-form{display:grid;gap:12px}
.prop-form [data-stage]{display:grid;gap:12px}

.field{display:grid;gap:6px;position:relative}
.field label{font-size:11.5px;font-weight:600;color:#777}

.field select,
.field input,
.nish-btn{
  width:100%;height:50px;padding:0 16px;
  border:1px solid var(--b);border-radius:16px;
  background:#f7f7f7;color:var(--t);
  font:inherit;font-size:14px;outline:0;
  transition:.2s;
}

.field select{
  appearance:none;-webkit-appearance:none;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 16px center;
  padding-right:44px;
}

.nish-btn:focus-visible{border-color:var(--o);background-color:#fff}
.field.bad .nish-btn{border-color:#e5484d}

.field .err{display:none;font-size:11px;color:#e5484d}
.field.bad .err{display:block}

.nish-btn{
  display:flex;align-items:center;justify-content:space-between;
  text-align:left;color:#8a8a8a;cursor:pointer;
}
.nish-btn.has{color:var(--t)}
.nish-btn svg{width:16px;height:16px;color:#777}

.chips{display:flex;flex-wrap:wrap;gap:8px}
.chips:empty{display:none}
.chip{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 8px 6px 12px;border-radius:20px;
  background:#fdeeee;color:var(--o);
  font-size:12px;font-weight:500;
}
.chip button{
  width:18px;height:18px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--o);color:#fff;font-size:11px;line-height:1;
}

.submit-btn{
  width:100%;height:48px;border-radius:16px;
  background:var(--o);color:#fff;
  font-size:14px;font-weight:600;margin-top:8px;
  box-shadow:0 8px 20px rgba(176,8,8,.22);
}
.submit-btn:active{transform:scale(.98)}

/* ===== Nişangah modalı ===== */
.modal{
  position:fixed;inset:0;z-index:2000;
  background:rgba(0,0,0,.45);
  display:flex;align-items:center;justify-content:center;
  padding:24px;
}
.modal-box{
  position:relative;
  width:100%;max-width:1000px;max-height:calc(100vh - 48px);
  background:#fff;border-radius:24px;
  display:flex;flex-direction:column;
  padding:24px 28px;
}
.modal-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}
.modal-head h3{font-size:16px;font-weight:700}
.modal-x{
  width:36px;height:36px;border-radius:50%;
  background:#f2f2f2;font-size:18px;flex:none;
}
.modal-search{
  height:42px;padding:0 16px;margin-bottom:14px;
  border:1px solid var(--b);border-radius:14px;
  background:#f7f7f7;font-size:13px;width:100%;
}
.modal-search:focus{border-color:var(--o);background:#fff}

.nish-list{
  flex:1;overflow:auto;
  columns:3;column-gap:28px;
  padding-right:6px;
}
.nish-item{
  display:flex;align-items:flex-start;gap:10px;
  padding:7px 0;break-inside:avoid;
  font-size:13px;cursor:pointer;
}
.nish-item input{
  width:18px;height:18px;margin-top:1px;flex:none;
  accent-color:var(--o);cursor:pointer;
}
.nish-empty{padding:20px 0;color:var(--m)}

.modal-foot{
  display:flex;justify-content:space-between;gap:12px;
  margin-top:16px;padding-top:16px;border-top:1px solid var(--b);
}
.modal-foot button{height:42px;padding:0 26px;border-radius:14px;font-weight:600}
.btn-clear{background:#eee;color:#555}
.btn-ok{background:var(--o);color:#fff}

body.lock{overflow:hidden}

/* ===== Form: bölmələr ===== */
.prop-form .sect{
  display:grid;gap:12px;
  padding:22px;
  border:1px solid var(--b);border-radius:24px;
  background:#fff;
  box-shadow:0 6px 24px rgba(0,0,0,.04);
}
.prop-form .sect-t{font-size:16px;font-weight:700;color:#2b1a14}

.field textarea{
  width:100%;min-height:150px;padding:14px 16px;
  border:1px solid var(--b);border-radius:16px;
  background:#f7f7f7;color:var(--t);
  font:inherit;font-size:14px;outline:0;resize:vertical;
  transition:.2s;
}
.counter{justify-self:end;font-size:11.5px;color:var(--m)}

/* Təmirli / Çıxarış / İpoteka */
.prop-form .checks{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.prop-form .check-card{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  height:48px;padding:0 16px;
  border:1px solid var(--b);border-radius:16px;background:#f7f7f7;
  font-size:13px;color:var(--t);cursor:pointer;
}
.prop-form .check-card input{
  width:20px;height:20px;accent-color:var(--o);cursor:pointer;
}
.prop-form .check-card:has(input:checked){
  background:#fdeeee;border-color:var(--o);color:var(--o);
}

/* Şəkil */
.prop-form .warn{
  padding:14px 16px;border-radius:16px;background:#f7f7f7;
  font-size:12.5px;line-height:1.5;
}
.prop-form .warn b{display:block;color:#e5484d;font-weight:600}
.prop-form .drop{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;
  height:150px;border:2px dashed var(--o);border-radius:20px;
  background:#fff7f7;color:var(--o);
  font-size:13px;font-weight:600;cursor:pointer;transition:.2s;
}
.prop-form .drop svg{width:38px;height:38px}
.prop-form .drop.over{background:#fdeeee}
.field.bad .drop{border-color:#e5484d;color:#e5484d}

.photo-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.photo-grid:empty{display:none}
.photo-grid .ph{
  position:relative;aspect-ratio:1;border-radius:14px;overflow:hidden;background:#eee;
}
.photo-grid img{width:100%;height:100%;object-fit:cover;display:block}
.photo-grid button{
  position:absolute;top:6px;right:6px;width:24px;height:24px;border-radius:50%;
  background:rgba(0,0,0,.6);color:#fff;font-size:12px;
}
.photo-grid em{
  position:absolute;left:6px;bottom:6px;padding:2px 8px;border-radius:10px;
  background:var(--o);color:#fff;font-size:11px;font-style:normal;font-weight:600;
}
.hint{font-size:11.5px;color:var(--m)}

/* ===== Form: ümumi dizayn ===== */
.form-wrap{max-width:none;margin:0 auto}
.form-top{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:12px;
}
.form-title{font-size:17px;font-weight:700;color:#2b1a14}
.step-count{
  padding:6px 14px;border-radius:20px;
  background:#fdeeee;color:var(--o);
  font-size:12px;font-weight:700;
}
.bar{height:6px;border-radius:3px;background:#eee;overflow:hidden;margin-bottom:24px}
.bar i{display:block;height:100%;width:0;background:var(--o);border-radius:3px;transition:width .35s}

/* Geri + Davam et: sol və sağ kənarda, eyni en */
.btns{display:flex;justify-content:space-between;gap:12px}
.btns .submit-btn,
.btns .back2{flex:0 0 140px;width:140px;margin-top:0}

.back2{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  height:48px;padding:0 22px;border-radius:16px;
  border:1px solid var(--o);background:#fff;
  font-size:14px;font-weight:600;color:var(--o);
  transition:.2s;
}
.back2 svg{width:16px;height:16px;transform:rotate(90deg)}
.back2:hover{background:#fdeeee}

.next-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
}
.next-btn svg{width:16px;height:16px;transform:rotate(-90deg)}

.foot-row{display:flex;flex-direction:column-reverse;gap:14px}
.foot-row p{font-size:11.5px;line-height:1.55;color:var(--m);text-align:center}

/* Sahənin içində üzən ad */
.prop-form .field:has(>input:not([type=file]),>select)>label{
  position:absolute;left:17px;top:16px;z-index:1;
  font-size:14px;font-weight:400;color:#8a8a8a;
  pointer-events:none;transition:.15s;
}
.prop-form .field:has(>input:not([type=file]),>select).filled>label,
.prop-form .field:has(>input:not([type=file]),>select):focus-within>label,
.prop-form .field:has(>input:-webkit-autofill)>label{
  top:6px;font-size:10.5px;font-weight:600;color:var(--o);
}

.prop-form .field input:not([type=file]),
.prop-form .field select{
  height:50px;padding:18px 16px 4px;font-size:14px;
}
.prop-form .field select{padding-right:44px}

.prop-form .field input::placeholder{color:transparent}
.prop-form .field input:focus::placeholder{color:#b8b8b8}

/* Doldurulmuş sahə */
.prop-form .field.filled input:not([type=file]),
.prop-form .field.filled select,
.prop-form .field.filled textarea,
.prop-form .nish-btn.has{
  background-color:#fdf0f0;border-color:#f1c4c4;
}

/* Aktiv sahə */
.prop-form .field input:not([type=file]):focus,
.prop-form .field select:focus,
.prop-form .field textarea:focus{
  background-color:#fff;border-color:var(--o);
  box-shadow:0 0 0 4px rgba(176,8,8,.1);
}

/* Səhv */
.prop-form .field.bad input:not([type=file]),
.prop-form .field.bad select,
.prop-form .field.bad textarea{
  border-color:#e5484d;background-color:#fff;
}

/* Brauzer autofill */
.prop-form .field input:-webkit-autofill{
  -webkit-box-shadow:0 0 0 100px #fdf0f0 inset;
  -webkit-text-fill-color:var(--t);
}

/* ===== Xəritə (Leaflet) ===== */
.map-wrap{height:280px}
.map-box{
  position:relative;height:100%;
  border-radius:20px;overflow:hidden;background:#eee;
}
#leafletMap{position:absolute;inset:0;z-index:1}

.map-ctl{
  display:inline-flex;align-items:center;gap:6px;
  height:38px;padding:0 14px;border-radius:12px;
  background:#fff;border:1px solid var(--o);color:var(--o);
  font-size:12px;font-weight:600;
  box-shadow:0 4px 14px rgba(0,0,0,.15);
}
.map-ctl svg{width:16px;height:16px}

.map-full{position:absolute;top:12px;right:12px;z-index:1001}
.map-close{position:absolute;top:12px;right:12px;z-index:1001;display:none}

.map-bar{
  position:absolute;left:12px;right:12px;bottom:12px;z-index:1001;
  display:flex;justify-content:space-between;gap:10px;
  pointer-events:none;
}
.map-bar .map-ctl{pointer-events:auto}
.map-done{display:none;background:var(--o);color:#fff}

.map-note{font-size:11.5px;line-height:1.55;color:var(--m)}

/* Tam ekran rejimi */
.map-box.full{
  position:fixed;inset:0;z-index:3000;
  height:auto;border-radius:0;
}
.map-box.full .map-full{display:none}
.map-box.full .map-close{
  display:inline-flex;
  top:calc(12px + env(safe-area-inset-top,0px));
}
.map-box.full .map-done{display:inline-flex}
.map-box.full .map-bar{bottom:calc(16px + env(safe-area-inset-bottom,0px))}
.map-box.full .map-ctl{height:46px;font-size:13px}

/* ===== Mobil ===== */
@media(max-width:768px){
  html{-webkit-text-size-adjust:100%}

  body{
    background:#fafafa;
    padding-bottom:calc(92px + env(safe-area-inset-bottom,0px));
  }

  header{
    height:64px;padding:0 16px;
    position:sticky;top:0;z-index:900;
  }

  .logo{font-size:18px;gap:8px}
  .logo svg{width:24px;height:22px}

  .desktop-only,
  .desktop-add{display:none}

  .mobile-actions{display:flex;align-items:center;gap:12px}

  .mobile-add{
    display:grid;place-items:center;
    width:42px;height:42px;
    border-radius:14px;
    background:var(--o);color:#fff;
    box-shadow:0 8px 20px rgba(176,8,8,.25);
    flex:none;
  }

  .mobile-add svg{width:20px;height:20px;stroke-width:2.4}

  .mobile-user{display:flex !important;margin-left:0}
  .mobile-user .login-ico{width:42px;height:42px;border-radius:14px}

  .fav-btn:not(.fav-mobile){display:none}

  .fav-mobile{
    display:flex;
    width:42px;min-height:42px;padding:0;
    justify-content:center;
    border-radius:14px;
  }

  .fav-mobile .fav-count{
    position:absolute;top:-6px;right:-6px;
    min-width:18px;height:18px;
    font-size:10px;
    border:2px solid #fff;
  }

  .new-page{padding:44px 16px 10px;background:transparent}

  .new-box{
    padding:12px 0 24px;
    border-radius:0;
    background:transparent;
    box-shadow:none;
  }

  .new-box h1{font-size:20px;margin-bottom:28px}

  .choices{gap:12px}

  .choice{
    height:140px;gap:16px;
    font-size:13.5px;border-radius:20px;
    background:#fff;
  }

  .choice svg{width:36px;height:36px}

  .choices.types{grid-template-columns:repeat(2,minmax(0,1fr))}
  .choices.types .choice{height:140px}
  .choices.audience{grid-template-columns:1fr}

  footer{
    margin-top:20px;
    padding:20px 16px 16px;
    border-radius:24px 24px 0 0;
  }

  .f-top{gap:10px}

  .f-bottom{margin-top:14px;padding-top:12px;gap:6px}

  .bottom-nav{
    display:flex;
    align-items:center;
    position:fixed;left:0;right:0;bottom:0;
    z-index:1200;
    background:rgba(255,255,255,.97);
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
    border-top:1px solid var(--b);
    padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px));
    box-shadow:0 -10px 30px rgba(0,0,0,.07);
  }

  .bottom-nav a:not(.nav-add){
    flex:1;
    min-height:54px;
    display:flex;flex-direction:column;
    align-items:center;justify-content:center;gap:4px;
    border-radius:16px;
    color:#8a8a8a;
    font-size:10px;font-weight:600;
  }

  .bottom-nav a:not(.nav-add) svg{width:22px;height:22px}

  .bottom-nav a.on:not(.nav-add){color:var(--o);background:#fdeeee}

  .nav-add{
    flex:0 0 60px;
    width:60px;height:60px;
    margin-top:-30px;
    border-radius:50%;
    background:var(--o);
    color:#fff;
    display:grid;place-items:center;
    box-shadow:0 12px 26px rgba(176,8,8,.38);
    border:4px solid #fff;
    position:relative;
    z-index:5;
  }

  .nav-add svg{
    width:26px;height:26px;
    color:#fff;stroke:#fff;stroke-width:2.6;
  }

  .nav-add:active{transform:scale(.96)}

  /* Forma */
  .prop-form .sect{padding:16px 14px;border-radius:20px}
  .photo-grid{grid-template-columns:repeat(3,1fr)}
  .prop-form .checks{grid-template-columns:1fr}
  .btns .submit-btn,
  .btns .back2{flex:1;width:auto}

  /* iOS-da inputa toxunanda zoom olmasın deyə 16px saxlanıb. */
  .prop-form .field input:not([type=file]),
  .prop-form .field select{font-size:16px}
  .prop-form .field:has(>input:not([type=file]),>select)>label{font-size:15px}

  .map-wrap{height:240px}

  .modal{padding:0;align-items:flex-end}
  .modal-box{
    max-width:none;height:88vh;max-height:88vh;
    border-radius:24px 24px 0 0;padding:20px 16px;
  }
  .nish-list{columns:1}
}

@media(max-width:380px){
  .new-page{padding:36px 12px 6px}
  .new-box{padding:8px 0 20px}
  .new-box h1{font-size:18px}
  .choice{height:124px;font-size:13px}
  .choice svg{width:32px;height:32px}
  .back2{padding:0 16px}
}


/* Kimlər üçün: 3 kart yan-yana */
.choices.audience{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}

@media(max-width:768px){
    .choices.audience{grid-template-columns:repeat(3,1fr);gap:10px}
    .choices.audience .choice{padding:18px 6px;min-height:0}
    .choices.audience .choice span{font-size:13px}
}
