body {
  font-family: "Segoe UI", sans-serif;
  margin: 0;
  background: #f4f6f9;
}

/* === Экраны === */
.screen {
  display: none;
  padding-bottom: 80px;  /* отступ снизу под меню */
}
.screen.active {
  display: block;
}

.center {
  text-align: center;
  margin-top: 20px;
}

/* === Замок === */
.lock-wrap {
  width: 80px;
  height: 100px;
  margin: 20px auto;
  position: relative;
  cursor: pointer;
}
.lock-body {
  width: 80px;
  height: 60px;
  background: #4caf50;
  border-radius: 8px;
  position: absolute;
  bottom: 0;
  left: 0;
}
.lock-shackle {
  width: 50px;
  height: 50px;
  border: 6px solid #4caf50;
  border-bottom: none;
  border-radius: 25px 25px 0 0;
  position: absolute;
  top: 0;
  left: 15px;
  transform-origin: center bottom;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
/* При открытии */
.lock-wrap.open .lock-shackle {
  transform: rotate(-40deg) translate(-15px, -20px);
}

.status {
  font-weight: 500;
  margin-top: 8px;
  color: #2e7d32;
}

/* === Карточки === */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin: 15px auto;
  width: 280px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.card select, .btn-parking, .btn-green, .btn-outline {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
}
.btn-parking, .btn-green {
  background: #4caf50;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  border: none;
}
.btn-parking:hover, .btn-green:hover { background: #388e3c; }
.btn-outline {
  background: #fff;
  color: #333;
  border: 1px solid #999;
}
.btn-outline:hover { background: #eee; }

/* === Ворота === */
.gate-box {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}
.gate {
  width: 50px;
  height: 100px;
  background: #888;
  margin: 0 5px;
  transition: transform 0.6s ease;
}
.gate-box.open .left { transform: translateX(-60px); }
.gate-box.open .right { transform: translateX(60px); }

/* === Журнал === */
.log-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.log-list li {
  padding: 4px 0;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
}

/* === Модалки === */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  width: 320px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: fadeIn 0.3s ease;
}
.modal-content h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
  text-align: center;
  color: #2e7d32;
}
.modal-content input,
.modal-content select {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.modal-content .row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.modal-content .btn-green {
  flex: 1;
  background: #4caf50;
  color: #fff;
  border: none;
}
.modal-content .btn-outline {
  flex: 1;
  background: #fff;
  border: 1px solid #999;
}
.modal-content .btn-green:hover { background: #388e3c; }
.modal-content .btn-outline:hover { background: #eee; }

/* Превью фото */
.preview {
  display: none;
  max-width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin: 10px auto;
  border: 1px solid #ddd;
}

/* Анимация появления */
@keyframes fadeIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* === Таббар === */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  display: flex;
  justify-content: space-around;
  border-top: 1px solid #ccc;
  height: 60px;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar .tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 16px;
  background: none;
  border: none;
  cursor: pointer;
}
.tabbar .tab img.tab-icon {
  width: 20px;
  height: 20px;
}

/* === Toast уведомления === */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #e6f0ff;
  color: #111;
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateX(120%);
  transition: opacity 0.4s ease, transform 0.4s ease;
  min-width: 240px;
  z-index: 9999;
}
.toast img { width: 28px; height: 28px; }
.toast.show {
  opacity: 1;
  transform: translateX(0);
}
@media (max-width: 600px) {
  .toast {
    top: 10px;
    right: 10px;
    min-width: 160px;
    font-size: 13px;
  }
  .tabbar {
    height: 70px;
    font-size: 14px;
  }
  .screen {
    padding-bottom: 90px;
  }
}

/* === Иконки в карточках === */
.card .icon {
  width: 20px;
  height: 20px;
  margin-right: 6px;
  vertical-align: middle;
}
/* === Красивый input file === */
.file-input {
  display: none; /* скрываем стандартный */
}

.file-label {
  display: inline-block;
  background: #4caf50;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  text-align: center;
  transition: background 0.3s;
  margin-bottom: 12px;
}
.file-label:hover {
  background: #388e3c;
}
.title-icon {
  width: 50px;
  height: 50px;
  margin-right: 6px;
  vertical-align: middle;
}
