:root{
  --ninfo-form-orange:#f36b21;
  --ninfo-form-text:#292d31;
  --ninfo-form-muted:#74797e;
  --ninfo-form-border:#dfe2e5;
  --ninfo-form-soft:#f7f8f9;
  --ninfo-form-radius:14px;
  --ninfo-form-gap:18px;
}

/* One visual system for classified, auto and realty submission forms. */
.classified-form,
.auto-add-form,
.realty-submit-form{
  box-sizing:border-box;
  width:100%;
  max-width:820px!important;
  color:var(--ninfo-form-text);
  font-family:"Open Sans",Arial,sans-serif!important;
}

.classified-form__step,
.auto-add-panel,
.realty-submit-form>section{
  box-sizing:border-box;
  min-width:0;
}

.auto-add-panel{
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

.classified-form__step>h2,
.auto-add-panel>h2,
.realty-submit-form h2{
  margin:0 0 18px!important;
  color:var(--ninfo-form-text)!important;
  font:600 22px/1.25 "Open Sans",Arial,sans-serif!important;
}

.classified-form__field,
.auto-add-grid>label,
.auto-extra__body>label,
.realty-form-grid>label{
  min-width:0;
}

.classified-form__field>span:first-child,
.auto-add-grid label>span:first-child,
.auto-extra__body label>span:first-child,
.realty-form-grid label>span:first-child{
  display:block;
  margin:0 0 8px!important;
  color:#454a4f!important;
  font:500 13px/1.3 "Open Sans",Arial,sans-serif!important;
  text-decoration:none!important;
  border:0!important;
}

.classified-form__field input,
.classified-form__field select,
.classified-form__field textarea,
.auto-add-grid input:not([type=radio]):not([type=checkbox]),
.auto-add-grid select,
.auto-add-grid textarea,
.auto-extra select,
.realty-form-grid input:not([type=radio]):not([type=checkbox]),
.realty-form-grid select,
.realty-form-grid textarea{
  box-sizing:border-box!important;
  display:block;
  width:100%!important;
  min-width:0!important;
  min-height:48px!important;
  height:auto;
  margin:0!important;
  padding:11px 14px!important;
  border:1px solid var(--ninfo-form-border)!important;
  border-bottom:1px solid var(--ninfo-form-border)!important;
  border-radius:var(--ninfo-form-radius)!important;
  outline:0!important;
  background:#fff!important;
  color:var(--ninfo-form-text)!important;
  font:14px/1.35 "Open Sans",Arial,sans-serif!important;
  text-decoration:none!important;
  box-shadow:none!important;
  transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease;
}

.classified-form__field textarea,
.auto-add-grid textarea,
.realty-form-grid textarea{
  min-height:120px!important;
  resize:vertical;
}

.classified-form__field input:focus,
.classified-form__field select:focus,
.classified-form__field textarea:focus,
.auto-add-grid input:focus,
.auto-add-grid select:focus,
.auto-add-grid textarea:focus,
.auto-extra select:focus,
.realty-form-grid input:focus,
.realty-form-grid select:focus,
.realty-form-grid textarea:focus{
  border-color:var(--ninfo-form-orange)!important;
  box-shadow:0 0 0 3px rgba(243,107,33,.11)!important;
}

.auto-add-grid,
.classified-form__attributes-grid{
  gap:var(--ninfo-form-gap) 16px!important;
}

.auto-add-grid>label:before,
.auto-add-grid>label:after{
  display:none!important;
  content:none!important;
  border:0!important;
}

.auto-suggest:empty{display:none!important}
.auto-suggest{
  margin-top:6px;
  overflow:hidden;
  border:1px solid var(--ninfo-form-border)!important;
  border-radius:var(--ninfo-form-radius)!important;
  box-shadow:0 14px 34px rgba(30,34,38,.14)!important;
}
.auto-suggest button{padding:11px 14px!important;text-decoration:none!important}
.auto-suggest button:last-child{border-bottom:0!important}

.auto-choice,.auto-check-grid{gap:8px!important}
.auto-choice span,.auto-check-grid span{
  min-height:42px!important;
  padding:8px 13px!important;
  border:1px solid var(--ninfo-form-border)!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#40454a;
  font-weight:500;
  box-shadow:none!important;
}
.auto-choice input:checked+span,.auto-check-grid input:checked+span{
  border-color:var(--ninfo-form-orange)!important;
  background:#fff3eb!important;
  color:#c84e0e!important;
  box-shadow:0 0 0 1px var(--ninfo-form-orange)!important;
}

.auto-color-block details,.auto-extra details,.classified-form__attributes{
  overflow:hidden!important;
  border:1px solid #e7e9eb!important;
  border-radius:var(--ninfo-form-radius)!important;
  background:var(--ninfo-form-soft)!important;
  box-shadow:none!important;
}
.auto-color-block summary,.auto-extra summary{
  min-height:52px!important;
  padding:13px 44px 13px 15px!important;
  border:0!important;
  background:transparent!important;
  font-size:14px!important;
  font-weight:600!important;
}
.auto-extra summary:after{right:15px!important}
.auto-extra__body{padding:4px 15px 16px!important}
.auto-extra{gap:10px!important}

.auto-photo-drop,.classified-form__photos,.realty-photo-input{
  box-sizing:border-box;
  padding:22px!important;
  border:1.5px dashed #d3d7da!important;
  border-radius:16px!important;
  background:#fafbfb!important;
}

.classified-form__actions,.auto-add-nav,.realty-form-actions{
  gap:10px!important;
  margin-top:22px!important;
  padding:0!important;
  border:0!important;
}
.classified-form__actions button,
.classified-form__actions a.classified-board__btn,
.auto-add-nav button,
.realty-form-actions button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box;
  min-height:46px!important;
  padding:0 20px!important;
  border:1px solid transparent!important;
  border-radius:12px!important;
  font:600 14px "Open Sans",Arial,sans-serif!important;
  line-height:1!important;
  text-decoration:none!important;
  box-shadow:none!important;
}
.auto-add-nav button[data-prev],
.classified-form__actions [data-form-prev],
.classified-form__actions a.classified-board__btn{
  border-color:#e2e4e6!important;background:#f3f4f5!important;color:#34383c!important
}
.classified-form__actions .classified-board__btn_primary{
  border-color:var(--ninfo-form-orange)!important;background:var(--ninfo-form-orange)!important;color:#fff!important
}

.classified-form__row+.classified-form__field{margin-top:18px!important}

.realty-submit-form>section{
  padding:22px!important;
  border:1px solid #e7e9eb!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:none!important;
}

html[data-theme=dark] .classified-form__field input,
html[data-theme=dark] .classified-form__field select,
html[data-theme=dark] .classified-form__field textarea,
html[data-theme=dark] .auto-add-grid input:not([type=radio]):not([type=checkbox]),
html[data-theme=dark] .auto-add-grid select,
html[data-theme=dark] .auto-add-grid textarea,
html[data-theme=dark] .auto-extra select,
html[data-theme=dark] .realty-form-grid input,
html[data-theme=dark] .realty-form-grid select,
html[data-theme=dark] .realty-form-grid textarea{border-color:#42474d!important;background:#25292d!important;color:#f3f4f5!important}

/* Classified submission: a real dark surface and hard mobile width bounds. */
html[data-theme=dark] .classified-form{
  color:#eef1f4!important;
}
.classified-form__step[hidden]{display:none!important}
html[data-theme=dark] .classified-form,
html[data-theme=dark] .classified-form__step,
html[data-theme=dark] .classified-form__attributes,
html[data-theme=dark] .classified-form__attributes-grid,
html[data-theme=dark] .classified-form__attributes-grid>*{
  box-sizing:border-box!important;
  min-width:0!important;
  max-width:100%!important;
}
html[data-theme=dark] .classified-form__step>h2,
html[data-theme=dark] .classified-form__section-head h2{
  color:#f2f4f6!important;
}
html[data-theme=dark] .classified-form__section-head p,
html[data-theme=dark] .classified-form__draft-note,
html[data-theme=dark] .classified-form__photo-help,
html[data-theme=dark] .classified-form__selected-category{
  color:#aeb5bc!important;
}
html[data-theme=dark] .classified-form__field,
html[data-theme=dark] .classified-form__field>span:first-child{
  color:#d9dde1!important;
}
html[data-theme=dark] .classified-form__attributes{
  border-color:#3d444b!important;
  background:#22272d!important;
  color:#eef1f4!important;
}
html[data-theme=dark] .classified-form__photos{
  border-color:#4a5159!important;
  background:#22272d!important;
  color:#eef1f4!important;
}
html[data-theme=dark] .classified-color-palette__item{
  border-color:#454c54!important;
  background:#292e34!important;
  color:#d9dde1!important;
}
html[data-theme=dark] .classified-color-palette__item.is-active{
  border-color:#f58220!important;
  background:#33281f!important;
  color:#fff!important;
}
html[data-theme=dark] .classified-form__actions [data-form-prev],
html[data-theme=dark] .classified-form__actions a.classified-board__btn{
  border-color:#454c54!important;
  background:#2b3036!important;
  color:#e5e8eb!important;
}
html[data-theme=dark] .classified-form__actions .classified-board__btn_primary{
  border-color:#f58220!important;background:#f58220!important;color:#fff!important
}

@media(max-width:700px){
  .classified-form,.auto-add-form,.realty-submit-form{width:100%!important;min-width:0!important;max-width:100%!important;overflow-x:clip!important}
  .auto-add-grid,.classified-form__attributes-grid,.realty-form-grid{grid-template-columns:1fr!important;gap:14px!important}
  .auto-add-wide,.realty-form-grid label.wide{grid-column:auto!important}
  .auto-photo-drop,.classified-form__photos,.realty-photo-input{padding:17px!important;border-radius:14px!important}
  .realty-submit-form>section{padding:17px 14px!important;border-radius:14px!important}
  .classified-form__actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  .classified-form__actions .classified-board__btn_primary{grid-column:1/-1;grid-row:1}
  .classified-form__actions [data-form-prev],.classified-form__actions a.classified-board__btn{width:100%!important}
  /* iOS Safari zooms fields below 16px and makes the page appear wider while focused. */
  .classified-form__field input,
  .classified-form__field select,
  .classified-form__field textarea,
  .classified-form__attributes input,
  .classified-form__attributes select,
  .classified-form__attributes textarea{
    max-width:100%!important;
    font-size:16px!important;
    touch-action:manipulation;
  }
}
.auto-add-account{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 18px;padding:11px 14px;border-radius:12px;background:#f6f7f8;color:#303236;font-size:14px}.auto-add-account span{display:flex;align-items:center;gap:8px;min-width:0}.auto-add-account i{color:#f46b21;font-size:18px}.auto-add-account strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.auto-add-account a{flex:0 0 auto;color:#f46b21;text-decoration:none}.auto-add-account a:hover{text-decoration:underline}@media(max-width:560px){.auto-add-account{margin-bottom:12px;padding:9px 11px;font-size:13px;gap:10px}}
.auto-add-form label.is-invalid>input,.auto-add-form label.is-invalid>select,.auto-add-form label.is-invalid>textarea{border-color:#d92d20!important;background-color:#fff3f2!important;box-shadow:0 0 0 3px rgba(217,45,32,.12)!important}.auto-add-form .auto-photo-drop.is-invalid,.auto-add-form .auto-add-types.is-invalid{outline:2px solid #d92d20;outline-offset:4px;border-radius:12px}.auto-field-error{display:block;width:100%;margin-top:6px;color:#c5221f;font-size:13px;font-weight:600;line-height:1.3}.auto-add-types>.auto-field-error{grid-column:1/-1;margin-top:2px}.auto-photo-drop>.auto-field-error{color:#c5221f}@media(prefers-color-scheme:dark){.auto-add-form label.is-invalid>input,.auto-add-form label.is-invalid>select,.auto-add-form label.is-invalid>textarea{background-color:#351f20!important;border-color:#ff746b!important}.auto-field-error{color:#ff8a82}}

/* Realty submission — complete dark palette. Keep this block last so old
   realty.css declarations cannot return white panels and native controls. */
[data-theme="dark"] .realty-submit-page{
  color:#eef1f4!important;
}
[data-theme="dark"] .realty-submit-form,
[data-theme="dark"] .realty-submit-form>section,
[data-theme="dark"] .realty-form-grid,
[data-theme="dark"] .realty-form-grid>*{
  box-sizing:border-box!important;
  min-width:0!important;
  max-width:100%!important;
}
[data-theme="dark"] .realty-submit-form>section{
  border-color:#3d444b!important;
  background:#22272d!important;
  color:#eef1f4!important;
}
[data-theme="dark"] .realty-submit-form h2{
  color:#f3f5f7!important;
}
[data-theme="dark"] .realty-form-grid label>span:first-child{
  color:#d9dde1!important;
}
[data-theme="dark"] .realty-form-grid input,
[data-theme="dark"] .realty-form-grid select,
[data-theme="dark"] .realty-form-grid textarea{
  border-color:#454c54!important;
  background:#292e34!important;
  color:#f3f5f7!important;
  color-scheme:dark;
}
[data-theme="dark"] .realty-form-grid input::placeholder,
[data-theme="dark"] .realty-form-grid textarea::placeholder{
  color:#929aa2!important;
  opacity:1;
}
[data-theme="dark"] .realty-form-grid select option{
  background:#292e34!important;
  color:#f3f5f7!important;
}
[data-theme="dark"] .realty-photo-input{
  border-color:#4a525a!important;
  background:#252a30!important;
  color:#eef1f4!important;
}
[data-theme="dark"] .realty-photo-input small{color:#aeb5bc!important}
[data-theme="dark"] .realty-submit-steps span{
  background:#292e34!important;
  color:#b8bec5!important;
}
[data-theme="dark"] .realty-submit-steps .is-active{
  background:#3a2a21!important;
  color:#ff8a42!important;
}
[data-theme="dark"] .realty-form-actions a{
  color:#c8cdd2!important;
}
[data-theme="dark"] .realty-form-errors{
  border-color:#704145!important;
  background:#352427!important;
  color:#ffb4b4!important;
}

@media(max-width:700px){
  .realty-submit-page,.realty-submit-form,.realty-submit-form>section,.realty-form-grid,.realty-form-grid>*{
    min-width:0!important;
    max-width:100%!important;
  }
  .realty-form-grid input,.realty-form-grid select,.realty-form-grid textarea{
    font-size:16px!important;
    touch-action:manipulation;
  }
}
/* Понятное состояние формы после возврата из авторизации. */
.classified-form__auth-success,
.classified-form__account{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  box-sizing:border-box;
  margin:0 0 14px;
  padding:12px 14px;
  border-radius:12px;
  background:#f2f8f3;
  color:#183b24;
}
.classified-form__auth-success>i,
.classified-form__account>i{font-size:22px;color:#2e9b50;flex:0 0 auto}
.classified-form__auth-success>span{display:flex;flex:1 1 auto;min-width:0;flex-direction:column;gap:2px}
.classified-form__auth-success strong{font-size:15px;line-height:1.25}
.classified-form__auth-success small{font-size:13px;line-height:1.3;color:#53665a}
.classified-form__auth-success>a{flex:0 0 auto;color:#d95616;text-decoration:none;font-size:13px}
.classified-form__account{background:#f6f6f6;color:#363636}
.classified-form__account>span{font-size:14px}
html[data-theme="dark"] .classified-form__auth-success{background:#173322;color:#e9fff0}
html[data-theme="dark"] .classified-form__auth-success small{color:#b7cebf}
html[data-theme="dark"] .classified-form__account{background:#252525;color:#f2f2f2}
@media(max-width:600px){
  .classified-form__auth-success{align-items:flex-start;flex-wrap:wrap;padding:11px 12px}
  .classified-form__auth-success>a{margin-left:34px}
}
