.add-flash {
  max-width: 720px;
  margin: 0 auto 16px;
}
.add-flash__err { color: #e11d48; }
.add-flash__ok { color: #15803d; }

.add-form {
  max-width: 720px;
  overflow: visible;
}
.form-card.add-form {
  overflow: visible;
}
.add-edit-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.add-edit-photos img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.add-form__title {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.add-form__hint {
  font-weight: 400;
  color: #71717a;
  font-size: 12px;
}
.add-form__note {
  margin: -8px 0 14px;
  font-size: 12px;
  color: #00aaff;
}
.btn--publish {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #00aaff !important;
  color: #fff !important;
  border: 0;
  border-radius: 12px;
  padding: 14px 28px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}
.btn--publish:hover {
  background: #0095e0 !important;
  color: #fff !important;
}

.add-attrs {
  margin: 4px 0 20px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  overflow: visible;
}
.add-attrs__lead {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: #52525b;
}
.add-attrs__title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}
.add-attrs__grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .add-attrs__grid {
    grid-template-columns: 1fr 1fr;
  }
}
.add-attrs__field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.add-form .form-card input:not(.add-combo__input):not([type='file']):not([type='hidden']),
.add-attrs__field input:not(.add-combo__input) {
  width: 100%;
  min-height: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  line-height: 42px;
  background-color: #fff;
  box-sizing: border-box;
  margin: 0;
}
.add-form .form-card textarea {
  min-height: 120px;
  height: auto;
  line-height: 1.45;
  padding: 10px 12px;
}
.add-attrs__field input[type='number']::-webkit-outer-spin-button,
.add-attrs__field input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.add-attrs__field input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.add-form > select#add-category-native {
  display: none;
}
.form-card .add-combo {
  margin-bottom: 16px;
}
.form-card select.add-combo__native {
  margin-bottom: 0 !important;
  padding: 0 !important;
  width: 1px !important;
}

.add-attrs__field {
  overflow: visible;
}

.add-attrs__field:has(.add-vin-input) {
  grid-column: 1 / -1;
  padding: 14px 16px;
  border: 1px solid #d4d4d8;
  border-radius: 12px;
  background: #f8fafc;
}

.add-vin-input {
  font-family: ui-monospace, Consolas, 'Courier New', monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-height: 46px;
  font-size: 16px;
}

.add-vin-status {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
}
.add-vin-status--ok {
  color: #15803d;
}
.add-vin-status--error {
  color: #dc2626;
}
.add-vin-status--warn {
  color: #a16207;
}

.add-combo {
  position: relative;
  width: 100%;
  min-width: 0;
  isolation: isolate;
}
.add-combo--in-form {
  margin-bottom: 16px;
}
.add-combo__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border: 0 !important;
}
.add-combo__input.is-pick {
  cursor: pointer;
  caret-color: transparent;
}
.add-form .add-combo__input {
  width: 100%;
  min-height: 42px;
  height: 42px;
  padding: 0 2.5rem 0 12px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  line-height: 42px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23757575' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px auto;
  box-sizing: border-box;
  margin: 0;
}
.add-form .add-combo__input.is-pick {
  line-height: 42px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.add-combo--category {
  margin-bottom: 16px;
}
.add-combo__input--category {
  font-weight: 500;
}
.add-combo__input:focus {
  outline: none;
  border-color: #00aaff;
  box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.15);
}
.add-combo__input:disabled {
  background: #f4f4f5;
  color: #a1a1aa;
}
.add-form .add-combo__toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 2.5rem;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: transparent;
  cursor: pointer;
}
.add-combo__toggle:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.add-combo__panel {
  position: fixed;
  z-index: 1000;
  box-sizing: border-box;
  max-height: min(280px, 50vh);
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}
.add-combo__item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 14px;
  color: #18181b;
  cursor: pointer;
}
.add-combo__item:hover,
.add-combo__item:focus-visible {
  background: #f0f9ff;
  color: #0077b6;
  outline: none;
}
.add-combo__item.is-active {
  background: #e0f4ff;
  color: #006da3;
  font-weight: 600;
}
.add-combo__empty,
.add-combo__more {
  margin: 8px 12px;
  font-size: 13px;
  color: #71717a;
}
.add-combo.is-open {
  position: relative;
  z-index: 20;
}
.add-city-suggest {
  margin-bottom: 14px;
  overflow: visible;
}
.add-city-suggest .search-combo {
  position: relative;
  width: 100%;
  isolation: isolate;
}
.add-city-suggest .search-combo__input {
  width: 100%;
  min-height: 42px;
  height: 42px;
  padding: 0 2.5rem 0 12px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  line-height: 42px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23757575' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px auto;
  box-sizing: border-box;
  cursor: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.add-city-suggest .search-combo.is-open .search-combo__input {
  border-color: #00aaff;
  box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.12);
}
.add-city-suggest .search-combo__toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 2.5rem;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0 10px 10px 0;
  background: transparent;
  cursor: pointer;
}
.add-city-suggest .search-combo__panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1200;
  max-height: min(280px, 50vh);
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  box-sizing: border-box;
}
.add-city-suggest .search-combo__panel[hidden] {
  display: none !important;
}
.add-city-suggest .search-combo__item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  color: #18181b;
  cursor: pointer;
}
.add-city-suggest .search-combo__item:hover,
.add-city-suggest .search-combo__item.is-active {
  background: #f0f9ff;
  color: #006da3;
}
.add-city-suggest .search-combo__empty {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  color: #757575;
}

/* Панель переносится в body — стили без привязки к .add-city-suggest */
.irr-city-panel[hidden] {
  display: none !important;
}
.irr-city-panel {
  position: fixed;
  z-index: 1200;
  max-height: min(280px, 50vh);
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  box-sizing: border-box;
}
.irr-city-panel .search-combo__item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0 !important;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  color: #18181b;
  cursor: pointer;
  box-shadow: none;
}
.irr-city-panel .search-combo__item:hover,
.irr-city-panel .search-combo__item.is-active {
  background: #f0f9ff;
  color: #006da3;
}
.irr-city-panel .search-combo__empty {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  color: #757575;
}

.add-combo.is-open .add-combo__input {
  border-color: #00aaff;
}

.add-photos--grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  width: 100%;
  margin-bottom: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  transition: box-shadow 0.15s;
}
@media (max-width: 640px) {
  .add-photos--grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.add-photos--grid.is-drag {
  box-shadow: 0 0 0 2px #00aaff;
  border-radius: 12px;
}
.add-photos__slots {
  display: contents;
}
label.add-photos__pick {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  min-width: 0;
  margin: 0 !important;
  font-weight: 400 !important;
  font-size: inherit;
  border: 1px dashed #c4c4c8;
  border-radius: 12px;
  cursor: pointer;
  background: #fafafa;
  color: #52525b;
  text-align: center;
  padding: 8px;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.add-photos__pick-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  padding: 2px 4px;
  pointer-events: none;
}
.add-photos__pick:hover {
  border-color: #00aaff;
  box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.12);
}
.add-photos__pick.is-full {
  display: none;
}
.add-photos__pick.is-compact {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
}
.add-photos__ico {
  font-size: 28px;
  line-height: 1;
}
.add-photos__plus {
  font-size: 11px;
  font-weight: 600;
  color: #00aaff;
  line-height: 1.25;
  white-space: nowrap;
}
.add-photos__sub {
  font-size: 9px;
  color: #a1a1aa;
  line-height: 1.25;
  white-space: nowrap;
}
.add-photos__item {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  min-width: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #e4e4e7;
  background: #fff;
  box-shadow: 0 4px 14px rgba(10, 10, 11, 0.06);
}
.add-photos__item.is-main {
  border-color: #00aaff;
}
.add-photos__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.add-photos__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.add-photos__main {
  position: absolute;
  left: 6px;
  bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  background: #00aaff;
  color: #fff;
  padding: 3px 8px;
  border-radius: 8px;
}
.add-photos__make-main {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 5px 4px;
  cursor: pointer;
}
.add-photos__note {
  margin: 0 0 18px;
  font-size: 12px;
  color: #71717a;
}
.form-error {
  color: #e11d48;
  font-size: 13px;
  margin: 0 0 12px;
}

.auth-modal[hidden] { display: none !important; }
.auth-modal {
  --accent: #00aaff;
  --accent-dark: #0095e0;
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-modal-open { overflow: hidden; }
.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 11, 0.5);
}
.auth-modal__dialog {
  position: relative;
  width: min(420px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 24px 22px 22px;
  box-shadow: 0 24px 64px rgba(10, 10, 11, 0.2);
}
.auth-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f4f4f5;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #71717a;
}
.auth-modal__title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
}
.auth-modal__lead {
  margin: 0 0 16px;
  font-size: 14px;
  color: #71717a;
  line-height: 1.4;
}
.auth-modal__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.auth-modal__tab {
  flex: 1;
  border: 1px solid #e4e4e7;
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: #71717a;
}
.auth-modal__tab.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, #fff);
}
.auth-modal__tab:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, #e4e4e7);
  color: var(--accent);
}
.auth-modal .btn--primary {
  background: var(--accent);
}
.auth-modal .btn--primary:hover {
  background: var(--accent-dark);
}
.auth-modal__form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.auth-modal__form input {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  font: inherit;
  box-sizing: border-box;
}
