.forms-panel {
  grid-column: 1;
  grid-row: 1;
  min-width: 360px;
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 44px 40px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.forms-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  gap: 12px;
}

.mini-brand { display: flex; align-items: center; gap: 10px; }
.mini-brand i { font-size: 28px; color: var(--burgundy-mid); }
.mini-brand h2 { font-size: 24px; font-weight: 800; }
.mini-brand h2 span { color: var(--burgundy-deep); }

.lang-btn {
  border: 1px solid var(--border-light);
  background: var(--bg-soft);
  color: var(--burgundy-deep);
  font-family: inherit;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
}

.form-box { display: none; flex-direction: column; gap: 18px; }
.form-box.active { display: flex; animation: fadeSlide 0.35s ease; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-box h3 { font-size: 22px; font-weight: 700; }
.form-box .sub { color: var(--text-muted); font-size: 14px; }

.input-group { position: relative; }

.input-group .icon {
  position: absolute;
  inset-inline-end: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 14px 50px 14px 18px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  appearance: none;
}

.input-group input:focus,
.input-group select:focus {
  border-color: var(--burgundy-mid);
  box-shadow: 0 0 0 4px rgba(168, 77, 114, 0.08);
  background: var(--bg-white);
}

.phone-wrapper { display: flex; gap: 8px; align-items: center; }
.phone-wrapper .input-group { flex: 1; }

.code-display {
  min-width: 96px;
  padding: 14px 10px;
  text-align: center;
  font-weight: 700;
  color: var(--burgundy-deep);
  background: var(--burgundy-pale);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.row-2 { display: flex; gap: 12px; flex-wrap: wrap; }
.row-2 .input-group { flex: 1; min-width: 140px; }

.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.options label { display: flex; align-items: center; gap: 8px; cursor: pointer; }

.options label input[type='checkbox'] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-light);
  border-radius: 6px;
}

.options label input[type='checkbox']:checked {
  background: var(--burgundy-mid);
  border-color: var(--burgundy-mid);
}

.link-btn, .options a {
  color: var(--burgundy-mid);
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}

.link-btn.center { display: block; text-align: center; width: 100%; }

.register-link {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--burgundy-pale);
  color: var(--burgundy-deep);
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}

.btn-primary {
  padding: 15px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--burgundy-mid), var(--burgundy-deep));
}

.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-secondary {
  padding: 14px;
  border: 1.5px solid var(--burgundy-light);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--burgundy-deep);
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
}

.input-error { border-color: var(--error) !important; }
.error-msg { color: var(--error); font-size: 12px; margin-top: 4px; display: none; }
.error-msg.show { display: block; }

@media (max-width: 1100px) {
  .main-wrap {
    grid-template-columns: 1fr;
  }

  .forms-panel {
    grid-column: 1;
    grid-row: 1;
    max-height: none;
  }

  .cards-panel {
    grid-column: 1;
    grid-row: 2;
  }
}

@media (max-width: 600px) {
  .forms-panel { padding: 24px 16px; }
  .phone-wrapper { flex-wrap: wrap; }
  .code-display { width: 100%; }
}
