/* Page baseline extracted from index.html. Shared overrides live in app-ui. */

/* Полный CSS из эталонной версии (как у тебя на скрине №2) */
body { margin: 0; background: #fff; color: #222; }
header { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 20px 60px; background: white; box-sizing: border-box; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { height: 56px; width: auto; max-width: 140px; flex: 0 0 auto; }
.brand h2 { margin: 0; }
nav { display: flex; flex-wrap: wrap; justify-content: center; }
nav a, .btn { margin: 0 10px; text-decoration: none; font-weight: 600; padding: 10px 20px; border-radius: 30px; }
.btn-primary { background: #064f3b; color: white; }
.btn-secondary { background: #fcd9a4; color: #000; }
#auth-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
#auth-buttons .btn { margin: 0; }
.brand-accent { color: #064f3b; }
.hero-bg {
  background: url('/assets/background.png') no-repeat center;
  background-size: cover;
  padding-top: 100px;
  padding-bottom: 300px;
  position: relative;
  z-index: 1;
}
.hero-text { padding: 0 60px; }
.stats, .cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding-top: 40px;
}
.stat, .card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  padding: 20px;
  flex: 1 1 250px;
  max-width: 300px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 10px;
}

#register-form, #login-form {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: white;
  padding: 16px;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(0,0,0,0.25);
  z-index: var(--ui-layer-dialog);
  transition: 0.3s ease;
  max-width: 480px;
  width: 90%;
  box-sizing: border-box;
}

body.auth-dialog-open::before {
  position: fixed;
  inset: 0;
  z-index: calc(var(--ui-layer-dialog) - 1);
  background: rgba(15, 35, 27, 0.52);
  content: '';
  backdrop-filter: blur(2px);
}

#register-form.active, #login-form.active {
  transform: translate(-50%, -50%) scale(1);
}

.form-inner {
  max-width: 360px;
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.btn-group {
  display: flex;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.modal {
  position: fixed;
  z-index: var(--ui-layer-dialog);
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
}

.modal.is-open {
  display: flex;
}

.modal-content {
  background-color: #fff;
  padding: 25px;
  border-radius: 10px;
  width: 300px;
  text-align: center;
}

#otpInput {
  width: 100%;
  padding: 8px;
  margin-top: 10px;
  margin-bottom: 15px;
  font-size: 18px;
  text-align: center;
}

#adminOtp {
  display: none;
}

.form-message {
  margin-top: 10px;
}

.form-message:empty,
.error-message:empty {
  display: none;
}

.error-message {
  color: red;
}

.message-error {
  color: red;
}

.message-success {
  color: green;
}

.message-info {
  color: #333;
}

@media (max-width: 820px) {
  header {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 20px;
  }

  nav {
    justify-content: flex-start;
    gap: 8px;
  }

  nav a, .btn {
    margin: 0;
  }

  #auth-buttons {
    justify-content: flex-start;
    width: 100%;
  }

  .hero-bg {
    padding-top: 44px;
    padding-bottom: 120px;
  }

  .hero-text {
    padding: 0 20px;
  }

  .stats, .cards {
    padding-left: 10px;
    padding-right: 10px;
  }
}
