* { box-sizing: border-box; }

:root{
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #22324a;
  --muted: #60708a;
  --border: #d8e0ee;
  --primary: #1f62d1;
  --primary-dark: #194fa9;
  --info-bg: #eaf2ff;
  --shadow: 0 10px 30px rgba(16, 34, 61, 0.08);
  --radius: 12px;
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.45;
}

.container{
  max-width: 880px;
  margin: 0 auto;
  padding: 44px 16px 64px;
}

.hero{
  text-align: center;
  margin-bottom: 26px;
}

.hero h1{
  font-size: 44px;
  letter-spacing: 0.2px;
  margin: 0 0 10px;
  color: #425476;
}

.hero p{
  margin: 0;
  font-size: 18px;
  color: var(--muted);
}

.panel{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-row{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 18px;
}

@media (min-width: 740px){
  .form-row.two{
    grid-template-columns: 1fr 1fr;
  }
}

.field{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.field .label{
  font-weight: 600;
  color: #3a4f74;
}

.field input{
  width: 210px;
  max-width: 60%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  outline: none;
}

.field input:focus{
  border-color: rgba(31, 98, 209, 0.55);
  box-shadow: 0 0 0 4px rgba(31, 98, 209, 0.12);
}

.select{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.select .label{
  font-weight: 600;
  color: #3a4f74;
}

.select select{
  width: 280px;
  max-width: 70%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  background: #fff;
}

.hint{
  margin: 8px 18px 0;
  color: var(--muted);
  font-size: 14px;
}

.button-row{
  padding: 18px;
  display: flex;
  justify-content: center;
}

button.primary{
  padding: 12px 22px;
  min-width: 260px;
  border: 0;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 600;
  background: var(--primary);
  color: white;
  cursor: pointer;
}

button.primary:hover{
  background: var(--primary-dark);
}

.alert{
  margin: 0 18px 18px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.alert.error{
  border-color: rgba(176, 0, 32, 0.25);
  background: rgba(176, 0, 32, 0.06);
  color: #7e0018;
}

.alert.ok{
  border-color: rgba(6, 95, 70, 0.25);
  background: rgba(6, 95, 70, 0.07);
  color: #0b4d39;
}

.info{
  margin-top: 18px;
  background: var(--info-bg);
  border: 1px solid rgba(31, 98, 209, 0.18);
  border-radius: var(--radius);
  padding: 18px 18px;
}

.info h2{
  margin: 0 0 8px;
  font-size: 20px;
  color: #2b4b7a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info p{
  margin: 0;
  color: #3f587e;
}

.section{
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.section h2{
  margin: 0 0 12px;
  font-size: 20px;
  color: #2b4b7a;
}

.faq h3{
  margin: 14px 0 6px;
  font-size: 16px;
  color: #364f77;
}

.faq p{
  margin: 0;
  color: var(--muted);
}

@media (max-width: 520px) {
  .hero h1 {
    font-size: 34px;
  }

  .field,
  .select {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .field input,
  .select select {
    width: 100%;
    max-width: 100%;
  }

  .hint {
    margin: 10px 18px 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  button.primary {
    min-width: 0;
    width: 100%;
  }
}

.panel {
  overflow: visible;
}

.section.suggest{
  margin-top: 28px;
}

.suggest-title{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 14px;
  color: #2b4b7a;
  font-size: 18px;
  font-weight: 700;
}

.suggest-title::before,
.suggest-title::after{
  content: "";
  height: 1px;
  background: var(--border);
  flex: 1;
}

.suggest-form{
  margin: 0;
}

.suggest-card{
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.suggest-line{
  display: grid;
  grid-template-columns: 170px 1fr;
  align-items: start;
  gap: 16px;
  padding: 8px 6px;
  border-bottom: 1px solid #edf1f8;
}

.suggest-line:last-child{
  border-bottom: 0;
}

.suggest-label{
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #364f77;
  padding-top: 6px;
  line-height: 1.3;
  cursor: text;
  user-select: text;
}

.suggest-input{
  width: 100%;
  max-width: 360px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  background: #fff;
  cursor: text !important;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.suggest-input::placeholder{
  color: var(--muted);
}

.suggest-input:focus{
  border-color: rgba(31, 98, 209, 0.55);
  box-shadow: 0 0 0 4px rgba(31, 98, 209, 0.12);
}

.suggest-actions{
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.suggest-actions button.primary{
  min-width: 140px;
  padding: 11px 18px;
}

@media (max-width: 520px){
  .suggest-line{
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 0;
  }

  .suggest-input{
    max-width: 100%;
  }
}

#toast-success{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.95);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(16, 34, 61, 0.18);
  border: 1px solid rgba(5, 150, 105, 0.35);
  z-index: 9999;
  transition: opacity 180ms ease, transform 180ms ease;
  max-width: calc(100% - 24px);
  text-align: center;
  pointer-events: none;
}

#toast-success.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
