/* Вход по коду + cookie banner */
.ag-auth {
  max-width: 520px;
  margin: 0 auto;
}
.ag-auth__card {
  background: #fff;
  border: 1px solid rgba(55, 42, 24, 0.12);
  border-radius: 16px;
  padding: 28px 24px 24px;
  box-shadow: none;
}
.ag-auth__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.ag-auth__tab {
  appearance: none;
  border: 1px solid rgba(55, 42, 24, 0.2);
  background: #f7f6f3;
  color: #372a18;
  border-radius: 10px;
  padding: 12px 10px;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
}
.ag-auth__tab.is-active {
  background: #372a18;
  border-color: #372a18;
  color: #fff;
}
.ag-auth__panel { display: none; }
.ag-auth__panel.is-active { display: block; }
.ag-auth__lead {
  margin: 0 0 16px;
  color: rgba(55, 42, 24, 0.75);
  font-size: 15px;
  line-height: 1.45;
}
.ag-auth__label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  color: #372a18;
}
.ag-auth__label span { color: #1d4ed8; }
.ag-auth__input {
  width: 100%;
  height: 48px;
  border: 1px solid #ebebef;
  border-radius: 8px;
  padding: 0 14px;
  margin-bottom: 14px;
  font-size: 16px;
  background: #fff;
  color: #372a18;
  box-sizing: border-box;
}
.ag-auth__input--code {
  letter-spacing: 0.35em;
  text-align: center;
  font-size: 22px;
}
.ag-auth__consent,
.ag-auth__remember {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 4px 0 16px;
  font-size: 13px;
  line-height: 1.4;
  color: #372a18;
}
.ag-auth__consent input,
.ag-auth__remember input {
  margin-top: 2px;
  flex: 0 0 auto;
}
.ag-auth__consent a {
  color: #1d4ed8;
  text-decoration: underline;
}
.ag-auth__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ag-auth__btn {
  appearance: none;
  border: none;
  border-radius: 8px;
  min-height: 48px;
  padding: 12px 18px;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
}
.ag-auth__btn--primary {
  background: #372a18;
  color: #fff;
}
.ag-auth__btn--primary:hover { background: #ff3d00; }
.ag-auth__btn--primary:disabled {
  opacity: 0.55;
  cursor: default;
}
.ag-auth__btn--ghost {
  background: transparent;
  color: #372a18;
  border: 1px solid rgba(55, 42, 24, 0.25);
}
.ag-auth__password-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.ag-auth__forgot {
  font-size: 13px;
  color: #1d4ed8;
}
.ag-auth__footer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(55, 42, 24, 0.1);
  display: grid;
  gap: 10px;
}
.ag-auth__register {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  border: 1px solid #372a18;
  border-radius: 8px;
  color: #372a18;
  text-decoration: none;
  font-size: 16px;
}
.ag-auth__hint {
  font-size: 13px;
  color: rgba(55, 42, 24, 0.65);
  line-height: 1.4;
}
.ag-auth__alert,
.ag-auth__msg {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
}
.ag-auth__alert,
.ag-auth__msg.is-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.ag-auth__msg.is-ok {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Cookie banner */
.ag-cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10050;
  background: #372a18;
  color: #fff;
  padding: 16px;
  box-shadow: none;
}
.ag-cookie__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: center;
  justify-content: space-between;
}
.ag-cookie__text {
  flex: 1 1 280px;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}
.ag-cookie__text a {
  color: #fff;
  text-decoration: underline;
}
.ag-cookie__btn {
  appearance: none;
  border: none;
  background: #fff;
  color: #372a18;
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 20px;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
}
.ag-cookie__btn:hover { background: #efefe3; }

body.ag-cookie-open { padding-bottom: 96px; }

@media (max-width: 640px) {
  .ag-auth__card { padding: 20px 16px; border-radius: 12px; }
  .ag-auth__tab { font-size: 13px; padding: 11px 8px; }
  .ag-auth__password-meta { flex-direction: column; align-items: flex-start; }
}
